Skip to content

Commit b3ba4c7

Browse files
committed
Unwrap types when converting to vector.
1 parent 6ac161a commit b3ba4c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sql/types/vector.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ func (t VectorType) Convert(ctx context.Context, v interface{}) (interface{}, sq
8181
return nil, sql.InRange, nil
8282
}
8383

84+
var err error
85+
v, err = sql.UnwrapAny(ctx, v)
86+
if err != nil {
87+
return nil, sql.OutOfRange, err
88+
}
89+
8490
switch val := v.(type) {
8591
case []byte:
8692
if t.Dimensions != 0 && len(val) != int(values.Float32Size)*t.Dimensions {

0 commit comments

Comments
 (0)