Skip to content

Commit b9de299

Browse files
committed
No need to convert nil values in enginetest.
1 parent f17bb79 commit b9de299

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

enginetest/server_engine.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,12 @@ func convertValue(ctx *sql.Context, sch sql.Schema, row sql.Row) sql.Row {
399399
}
400400
}
401401
case query.Type_VECTOR:
402-
r := row[i].([]byte)
403-
dimensions := len(r) / 4
404-
row[i] = make([]float32, dimensions)
405-
binary.Decode(r, binary.LittleEndian, row[i])
402+
if row[i] != nil {
403+
r := row[i].([]byte)
404+
dimensions := len(r) / 4
405+
row[i] = make([]float32, dimensions)
406+
binary.Decode(r, binary.LittleEndian, row[i])
407+
}
406408
case query.Type_TIME:
407409
if row[i] != nil {
408410
r, _, err := types.TimespanType_{}.Convert(ctx, string(row[i].([]byte)))

0 commit comments

Comments
 (0)