Skip to content

PGPRO-10316 Fix compiler error #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PGPRO-10316 Fix array test
  • Loading branch information
Potapov Alexander committed Sep 9, 2024
commit a82ed097ca57d956bb9276ee962aeabf46ebe9f5
6 changes: 3 additions & 3 deletions expected/array.out
Original file line number Diff line number Diff line change
Expand Up @@ -864,18 +864,18 @@ SELECT i,
END distance
FROM
(SELECT *, (i <=> '{51}') AS distance
FROM test_array_order WHERE i @> '{23,20}' ORDER BY i <=> '{51}', i) t;
FROM test_array_order WHERE i @> '{23,20}' ORDER BY i <=> '{51}') t ORDER BY i;
i | distance
---------------------+------------------
{20,23,51} | 1.73205080756888
{33,51,20,77,23,65} | 2.44948974278318
{6,97,20,89,23} | -1
{18,23,10,90,15,20} | -1
{20,23,51} | 1.73205080756888
{20,60,45,23,29} | -1
{20,98,30,23,1,66} | -1
{23,20,72} | -1
{23,76,34,23,2,20} | -1
{23,89,38,20,40,95} | -1
{33,51,20,77,23,65} | 2.44948974278318
{57,23,39,46,50,20} | -1
{73,23,20} | -1
{81,20,26,22,23} | -1
Expand Down
4 changes: 3 additions & 1 deletion sql/array.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-- 64 bit output in *.out, 32 bit output in *_1.out

set enable_seqscan=off;
set enable_sort=off;

Expand Down Expand Up @@ -216,4 +218,4 @@ SELECT i,
END distance
FROM
(SELECT *, (i <=> '{51}') AS distance
FROM test_array_order WHERE i @> '{23,20}' ORDER BY i <=> '{51}', i) t;
FROM test_array_order WHERE i @> '{23,20}' ORDER BY i <=> '{51}') t ORDER BY i;
2 changes: 2 additions & 0 deletions src/rumsort.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ rum_tuplesort_putrum(RumTuplesortstate *state, RumSortItem *item)
Size tuplen;
TuplesortPublic *base = TuplesortstateGetPublic((TuplesortPublic *)state);
#endif

oldcontext = MemoryContextSwitchTo(rum_tuplesort_get_memorycontext(state));
copytup_rum(state, &stup, item);

Expand Down Expand Up @@ -522,6 +523,7 @@ rum_tuplesort_putrumitem(RumTuplesortstate *state, RumScanItem *item)
Size tuplen;
TuplesortPublic *base = TuplesortstateGetPublic((TuplesortPublic *)state);
#endif

oldcontext = MemoryContextSwitchTo(rum_tuplesort_get_memorycontext(state));
copytup_rumitem(state, &stup, item);

Expand Down