diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 478cc0a..6e2e0bf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,6 +115,8 @@ jobs: sudo -u postgres make prove_installcheck env: PG_CFLAGS: -DUSE_ASSERT_CHECKING -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare + - if: ${{ failure() }} + run: cat pgvector/regression.diffs valgrind: if: ${{ !startsWith(github.ref_name, 'mac') && !startsWith(github.ref_name, 'windows') }} runs-on: ubuntu-latest diff --git a/src/sparsevec.c b/src/sparsevec.c index 82b52a1..073e031 100644 --- a/src/sparsevec.c +++ b/src/sparsevec.c @@ -594,12 +594,12 @@ vector_to_sparsevec(PG_FUNCTION_ARGS) /* * Get the L2 squared distance between sparse vectors */ -static double +static float SparsevecL2SquaredDistance(SparseVector * a, SparseVector * b) { float *ax = SPARSEVEC_VALUES(a); float *bx = SPARSEVEC_VALUES(b); - double distance = 0.0; + float distance = 0.0; int bpos = 0; for (int i = 0; i < a->nnz; i++) @@ -673,12 +673,12 @@ sparsevec_l2_squared_distance(PG_FUNCTION_ARGS) /* * Get the inner product of two sparse vectors */ -static double +static float SparsevecInnerProduct(SparseVector * a, SparseVector * b) { float *ax = SPARSEVEC_VALUES(a); float *bx = SPARSEVEC_VALUES(b); - double distance = 0.0; + float distance = 0.0; int bpos = 0; for (int i = 0; i < a->nnz; i++)