mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-02 02:31:16 +08:00
Fixed sparsevec_cmp_internal
This commit is contained in:
@@ -826,10 +826,10 @@ sparsevec_cmp_internal(SparseVector * a, SparseVector * b)
|
||||
}
|
||||
|
||||
if (a->nnz < b->nnz)
|
||||
return bx[nnz + 1] < 0 ? 1 : -1;
|
||||
return bx[nnz] < 0 ? 1 : -1;
|
||||
|
||||
if (a->nnz > b->nnz)
|
||||
return ax[nnz + 1] < 0 ? -1 : 1;
|
||||
return ax[nnz] < 0 ? -1 : 1;
|
||||
|
||||
if (a->dim < b->dim)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user