Change LittleEndian to BigEndian in flow_graph_insert_node (#10982)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
This commit is contained in:
yukun 2021-11-01 15:23:50 +08:00 committed by GitHub
parent d8044299a0
commit 9286abb9ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ func filterSegmentsByPKs(pks []int64, segment *Segment) ([]int64, error) {
buf := make([]byte, 8)
res := make([]int64, 0)
for _, pk := range pks {
binary.LittleEndian.PutUint64(buf, uint64(pk))
binary.BigEndian.PutUint64(buf, uint64(pk))
exist := segment.pkFilter.Test(buf)
if exist {
res = append(res, pk)

View File

@ -401,7 +401,7 @@ func TestGetSegmentsByPKs(t *testing.T) {
}
pks, err := filterSegmentsByPKs([]int64{0, 1, 2, 3, 4}, segment)
assert.Nil(t, err)
assert.Equal(t, len(pks), 1)
assert.Equal(t, len(pks), 3)
pks, err = filterSegmentsByPKs([]int64{}, segment)
assert.Nil(t, err)