Fixed conversion code in array_to_sparsevec [skip ci]

This commit is contained in:
Andrew Kane committed 2026-08-13 22:10:14 -07:00
1 parent 5a058d6218
commit a0b8e5df18
1 file changed
+1 -1
+1 -1
View File
@@ -747,7 +747,7 @@ array_to_sparsevec(PG_FUNCTION_ARGS)
else if (ARR_ELEMTYPE(array) == NUMERICOID)
{
for (int i = 0; i < nelemsp; i++)
nnz += IS_NOT_ZERO(DirectFunctionCall1(numeric_float4, elemsp[i]));
nnz += IS_NOT_ZERO(DatumGetFloat4(DirectFunctionCall1(numeric_float4, elemsp[i])));
}
else
{