@@ -58,10 +58,10 @@ const canHaveTimePrecision = type => ['time', 'timestamp'].includes(type);
58
58
const canHaveScale = type => type === 'numeric' ;
59
59
const canHaveTypeModifier = type => [ 'geography' , 'geometry' ] . includes ( type ) ;
60
60
61
- const isVector = type => type === 'vector' ;
61
+ const isVector = type => [ 'vector' , 'halfvec' , 'sparsevec' ] . includes ( type ) ;
62
62
63
63
const decorateType = ( type , columnDefinition ) => {
64
- const { length, precision, scale, typeModifier, srid, timezone, timePrecision, dimension, subtype , array_type } =
64
+ const { length, precision, scale, typeModifier, srid, timezone, timePrecision, dimension, array_type } =
65
65
columnDefinition ;
66
66
67
67
if ( canHaveLength ( type ) && _ . isNumber ( length ) ) {
@@ -75,8 +75,7 @@ const decorateType = (type, columnDefinition) => {
75
75
} else if ( canHaveTimePrecision ( type ) && ( _ . isNumber ( timePrecision ) || timezone ) ) {
76
76
type = addWithTimezone ( addPrecision ( type , timePrecision ) , timezone ) ;
77
77
} else if ( isVector ( type ) ) {
78
- const resolvedType = subtype || type ;
79
- type = dimension ? decorateVector ( resolvedType , dimension ) : resolvedType ;
78
+ type = dimension ? decorateVector ( type , dimension ) : type ;
80
79
}
81
80
82
81
return addArrayDecorator ( type , array_type ) ;
0 commit comments