From ba3b67c4a15397d6aa6af62f05b0eab9001975f2 Mon Sep 17 00:00:00 2001 From: Pavel Borisov Date: Fri, 27 Mar 2026 17:14:57 +0400 Subject: [PATCH v2 2/3] Stabilize output of join regression test The test added by 739f1d6218f5 assumes particular join rows order. When run on a non-heap table AM test might produce some other order. Adding order by clause fixes the difference. --- src/test/regress/expected/join.out | 6 +++--- src/test/regress/sql/join.sql | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out index 6917faec141..73b4edf14c6 100644 --- a/src/test/regress/expected/join.out +++ b/src/test/regress/expected/join.out @@ -4469,19 +4469,19 @@ select * from int8_tbl t1 left join int8_tbl t2 on t1.q2 = t2.q1, (8 rows) select * from int8_tbl t1 left join int8_tbl t2 on t1.q2 = t2.q1, - lateral (select * from int8_tbl t3 where t2.q1 = t2.q2) ss; + lateral (select * from int8_tbl t3 where t2.q1 = t2.q2) ss order by 1,2,3,4,5,6; q1 | q2 | q1 | q2 | q1 | q2 ------------------+------------------+------------------+------------------+------------------+------------------- 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 456 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 123 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 456 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 | 4567890123456789 + 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 123 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 - 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | 4567890123456789 | -4567890123456789 (10 rows) -- diff --git a/src/test/regress/sql/join.sql b/src/test/regress/sql/join.sql index 55080bec9af..5814a2b5593 100644 --- a/src/test/regress/sql/join.sql +++ b/src/test/regress/sql/join.sql @@ -1509,7 +1509,7 @@ select * from int8_tbl t1 left join int8_tbl t2 on t1.q2 = t2.q1, lateral (select * from int8_tbl t3 where t2.q1 = t2.q2) ss; select * from int8_tbl t1 left join int8_tbl t2 on t1.q2 = t2.q1, - lateral (select * from int8_tbl t3 where t2.q1 = t2.q2) ss; + lateral (select * from int8_tbl t3 where t2.q1 = t2.q2) ss order by 1,2,3,4,5,6; -- -- check handling of join aliases when flattening multiple levels of subquery -- 2.39.2 (Apple Git-143)