mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-02 02:31:16 +08:00
Switched to 0-based numbering for sparsevec on-disk format
This commit is contained in:
@@ -1318,7 +1318,7 @@ sparsevec_to_vector(PG_FUNCTION_ARGS)
|
||||
|
||||
result = InitVector(dim);
|
||||
for (int i = 0; i < svec->nnz; i++)
|
||||
result->x[svec->indices[i] - 1] = values[i];
|
||||
result->x[svec->indices[i]] = values[i];
|
||||
|
||||
PG_RETURN_POINTER(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user