Skip to content

Commit

Permalink
fix: Use corrent idx when converting SparseVector (#712)
Browse files Browse the repository at this point in the history
See also #707

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Apr 11, 2024
1 parent 4113bb5 commit 17959f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entity/columns_sparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (c *ColumnSparseFloatVector) FieldData() *schema.FieldData {
for idx := 0; idx < vector.Len(); idx++ {
pos, value, _ := vector.Get(idx)
binary.LittleEndian.PutUint32(row[idx*8:], pos)
binary.LittleEndian.PutUint32(row[pos*8+4:], math.Float32bits(value))
binary.LittleEndian.PutUint32(row[idx*8+4:], math.Float32bits(value))
}
data = append(data, row)
if vector.Dim() > dim {
Expand Down

0 comments on commit 17959f3

Please sign in to comment.