Skip to content

Commit 92114b7

Browse files
committed
Fix types on CreateVectorType
1 parent ff4fa73 commit 92114b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/types/vector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ const DefaultVectorDimensions = 2048
4444
const MaxVectorDimensions = 16383
4545

4646
// CreateVectorType creates a VECTOR type with the specified number of dimensions.
47-
func CreateVectorType(dimensions int) (sql.Type, error) {
47+
func CreateVectorType(dimensions int) (VectorType, error) {
4848
if dimensions < 1 || dimensions > MaxVectorDimensions {
49-
return nil, fmt.Errorf("VECTOR dimension must be between 1 and %d, got %d", MaxVectorDimensions, dimensions)
49+
return VectorType{}, fmt.Errorf("VECTOR dimension must be between 1 and %d, got %d", MaxVectorDimensions, dimensions)
5050
}
5151
return VectorType{Dimensions: dimensions}, nil
5252
}

0 commit comments

Comments
 (0)