Skip to content

Commit

Permalink
Remove unnecessary conversion
Browse files Browse the repository at this point in the history
Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia committed Nov 19, 2024
1 parent 14ce8e3 commit ef358ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/go_client/testcases/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func TestSearchPartitions(t *testing.T) {
queryRes, _ := mc.Query(ctx, client.NewQueryOption(schema.CollectionName).WithFilter(fmt.Sprintf("int64 in [%d, %d]", _defId0, _parId0)).WithOutputFields("*"))
require.ElementsMatch(t, []int64{_defId0, _parId0}, queryRes.GetColumn(common.DefaultInt64FieldName).(*column.ColumnInt64).Data())
for _, vec := range queryRes.GetColumn(common.DefaultFloatVecFieldName).(*column.ColumnFloatVector).Data() {
vectors = append(vectors, entity.FloatVector(vec))
vectors = append(vectors, vec)
}

for _, partitions := range [][]string{{}, {common.DefaultPartition, parName}} {
Expand All @@ -174,8 +174,8 @@ func TestSearchPartitions(t *testing.T) {
common.CheckSearchResult(t, searchResult, len(vectors), 5)
require.Contains(t, searchResult[0].IDs.(*column.ColumnInt64).Data(), _defId0)
require.Contains(t, searchResult[1].IDs.(*column.ColumnInt64).Data(), _parId0)
require.EqualValues(t, entity.FloatVector(searchResult[0].GetColumn(common.DefaultFloatVecFieldName).(*column.ColumnFloatVector).Data()[0]), vectors[0])
require.EqualValues(t, entity.FloatVector(searchResult[1].GetColumn(common.DefaultFloatVecFieldName).(*column.ColumnFloatVector).Data()[0]), vectors[1])
require.EqualValues(t, searchResult[0].GetColumn(common.DefaultFloatVecFieldName).(*column.ColumnFloatVector).Data()[0], vectors[0])
require.EqualValues(t, searchResult[1].GetColumn(common.DefaultFloatVecFieldName).(*column.ColumnFloatVector).Data()[0], vectors[1])
}
}

Expand Down

0 comments on commit ef358ef

Please sign in to comment.