diff --git a/tests/queries/0_stateless/00725_join_on_bug_2.sql b/tests/queries/0_stateless/00725_join_on_bug_2.sql index 14fedfa14e7..02fc3952cb0 100644 --- a/tests/queries/0_stateless/00725_join_on_bug_2.sql +++ b/tests/queries/0_stateless/00725_join_on_bug_2.sql @@ -1,3 +1,5 @@ +-- Tags: ignore-order + set joined_subquery_requires_alias = 0; drop table if exists t_00725_2; diff --git a/tests/queries/0_stateless/00725_join_on_bug_3.sql b/tests/queries/0_stateless/00725_join_on_bug_3.sql index 08b39d899cf..678516b4fc5 100644 --- a/tests/queries/0_stateless/00725_join_on_bug_3.sql +++ b/tests/queries/0_stateless/00725_join_on_bug_3.sql @@ -7,7 +7,7 @@ insert into t_00725_3 values(2,2); create table z_00725_3(c Int64, d Int64, e Int64) engine = TinyLog; insert into z_00725_3 values(1,1,1); -select * from t_00725_3 all left join z_00725_3 on (z_00725_3.c = t_00725_3.a and z_00725_3.d = t_00725_3.b); +select * from t_00725_3 all left join z_00725_3 on (z_00725_3.c = t_00725_3.a and z_00725_3.d = t_00725_3.b) ORDER BY t_00725_3.a; drop table if exists t_00725_3; drop table if exists z_00725_3; diff --git a/tests/queries/0_stateless/00818_join_bug_4271.sql b/tests/queries/0_stateless/00818_join_bug_4271.sql index ce11088fd95..7bf3b4bffd6 100644 --- a/tests/queries/0_stateless/00818_join_bug_4271.sql +++ b/tests/queries/0_stateless/00818_join_bug_4271.sql @@ -7,11 +7,11 @@ create table s_00818(a Nullable(Int64), b Nullable(Int64), c Nullable(String)) e insert into t_00818 values(1,1,'a'), (2,2,'b'); insert into s_00818 values(1,1,'a'); -select * from t_00818 left join s_00818 on t_00818.a = s_00818.a; -select * from t_00818 left join s_00818 on t_00818.a = s_00818.a and t_00818.a = s_00818.b; -select * from t_00818 left join s_00818 on t_00818.a = s_00818.a where s_00818.a = 1; -select * from t_00818 left join s_00818 on t_00818.a = s_00818.a and t_00818.a = s_00818.a; -select * from t_00818 left join s_00818 on t_00818.a = s_00818.a and t_00818.b = s_00818.a; +select * from t_00818 left join s_00818 on t_00818.a = s_00818.a ORDER BY t_00818.a; +select * from t_00818 left join s_00818 on t_00818.a = s_00818.a and t_00818.a = s_00818.b ORDER BY t_00818.a; +select * from t_00818 left join s_00818 on t_00818.a = s_00818.a where s_00818.a = 1 ORDER BY t_00818.a; +select * from t_00818 left join s_00818 on t_00818.a = s_00818.a and t_00818.a = s_00818.a ORDER BY t_00818.a; +select * from t_00818 left join s_00818 on t_00818.a = s_00818.a and t_00818.b = s_00818.a ORDER BY t_00818.a; drop table t_00818; drop table s_00818; diff --git a/tests/queries/0_stateless/00826_cross_to_inner_join.sql b/tests/queries/0_stateless/00826_cross_to_inner_join.sql index ce0c8ea2bfc..e9f9e13e2d3 100644 --- a/tests/queries/0_stateless/00826_cross_to_inner_join.sql +++ b/tests/queries/0_stateless/00826_cross_to_inner_join.sql @@ -19,9 +19,9 @@ SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a; SELECT '--- cross nullable ---'; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.b = t2_00826.b; SELECT '--- cross nullable vs not nullable ---'; -SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.b; +SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.b ORDER BY t1_00826.a; SELECT '--- cross self ---'; -SELECT * FROM t1_00826 x cross join t1_00826 y where x.a = y.a and x.b = y.b; +SELECT * FROM t1_00826 x cross join t1_00826 y where x.a = y.a and x.b = y.b ORDER BY x.a; SELECT '--- cross one table expr ---'; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t1_00826.b order by (t1_00826.a, t2_00826.a, t2_00826.b); SELECT '--- cross multiple ands ---'; @@ -38,7 +38,7 @@ SELECT '--- arithmetic expr ---'; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a + 1 = t2_00826.a + t2_00826.b AND (t1_00826.a + t1_00826.b + t2_00826.a + t2_00826.b > 5); SELECT '--- is null or ---'; -SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.b = t2_00826.a AND (t2_00826.b IS NULL OR t2_00826.b > t2_00826.a); +SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.b = t2_00826.a AND (t2_00826.b IS NULL OR t2_00826.b > t2_00826.a) ORDER BY t1_00826.a; SELECT '--- do not rewrite alias ---'; SELECT a as b FROM t1_00826 cross join t2_00826 where t1_00826.b = t2_00826.a AND b > 0;