diff --git a/tests/queries/0_stateless/00327_summing_composite_nested.reference b/tests/queries/0_stateless/00327_summing_composite_nested.reference index 7984f688b67..38c96d85524 100644 --- a/tests/queries/0_stateless/00327_summing_composite_nested.reference +++ b/tests/queries/0_stateless/00327_summing_composite_nested.reference @@ -1,5 +1,5 @@ -2000-01-01 1 [2,1] [4,3] [20,22] [2,2,1] ['5','5','0'] [-3,-3,-33] [10,100,1000] 2000-01-01 1 [1,2] [3,4] [10,11] [0,1,2] ['3','4','5'] [-1,-2,-3] [1,10,100] +2000-01-01 1 [2,1] [4,3] [20,22] [2,2,1] ['5','5','0'] [-3,-3,-33] [10,100,1000] 2000-01-01 2 [1,2] [3,4] [10,11] [0,1,2] ['3','4','5'] [-1,-2,-3] [1,10,100] 2000-01-01 2 [1,2] [3,4] [10,11] [0,1,2] ['3','4','5'] [-1,-2,-3] [1,10,100] 2000-01-01 2 [2,1,1] [4,3,3] [20,22,33] [2,2] ['5','5'] [-3,-3] [10,100] diff --git a/tests/queries/0_stateless/00327_summing_composite_nested.sql b/tests/queries/0_stateless/00327_summing_composite_nested.sql index e7b1b39ffaa..f9b251ebd8f 100644 --- a/tests/queries/0_stateless/00327_summing_composite_nested.sql +++ b/tests/queries/0_stateless/00327_summing_composite_nested.sql @@ -5,7 +5,7 @@ CREATE TABLE summing_composite_key (d Date, k UInt64, FirstMap Nested(k1 UInt32, INSERT INTO summing_composite_key VALUES ('2000-01-01', 1, [1,2], ['3','4'], [10,11], [0,1,2], [3,4,5], [-1,-2,-3], [1,10,100]), ('2000-01-01', 1, [2,1], ['4','3'], [20,22], [2,2,1], [5,5,0], [-3,-3,-33], [10,100,1000]), ('2000-01-01', 2, [1,2], ['3','4'], [10,11], [0,1,2], [3,4,5], [-1,-2,-3], [1,10,100]), ('2000-01-01', 2, [2,1,1], ['4','3','3'], [20,22,33], [2,2], [5,5], [-3,-3], [10,100]), ('2000-01-01', 2, [1,2], ['3','4'], [10,11], [0,1,2], [3,4,5], [-1,-2,-3], [1,10,100]); -SELECT * FROM summing_composite_key ORDER BY d, k, _part_index; +SELECT * FROM summing_composite_key ORDER BY d, k, FirstMap.k1, FirstMap.k2ID, FirstMap.s, SecondMap.k1ID, SecondMap.k2Key, SecondMap.k3Type, SecondMap.s; SELECT d, k, m.k1, m.k2ID, m.s FROM summing_composite_key ARRAY JOIN FirstMap AS m ORDER BY d, k, m.k1, m.k2ID, m.s, SecondMap.k1ID, SecondMap.k2Key, SecondMap.k3Type, SecondMap.s; SELECT d, k, m.k1, m.k2ID, sum(m.s) FROM summing_composite_key ARRAY JOIN FirstMap AS m GROUP BY d, k, m.k1, m.k2ID ORDER BY d, k, m.k1, m.k2ID; @@ -17,7 +17,7 @@ SELECT d, k, m.k1ID, m.k2Key, m.k3Type, m.s FROM summing_composite_key FINAL ARR OPTIMIZE TABLE summing_composite_key PARTITION 200001 FINAL; -SELECT * FROM summing_composite_key ORDER BY d, k, _part_index; +SELECT * FROM summing_composite_key ORDER BY d, k, FirstMap.k1, FirstMap.k2ID, FirstMap.s, SecondMap.k1ID, SecondMap.k2Key, SecondMap.k3Type, SecondMap.s;; SELECT d, k, m.k1, m.k2ID, m.s FROM summing_composite_key ARRAY JOIN FirstMap AS m ORDER BY d, k, m.k1, m.k2ID, m.s; SELECT d, k, m.k1, m.k2ID, sum(m.s) FROM summing_composite_key ARRAY JOIN FirstMap AS m GROUP BY d, k, m.k1, m.k2ID ORDER BY d, k, m.k1, m.k2ID; diff --git a/tests/queries/0_stateless/00799_function_dry_run.reference b/tests/queries/0_stateless/00799_function_dry_run.reference index 517ab65908f..8f855bb582d 100644 --- a/tests/queries/0_stateless/00799_function_dry_run.reference +++ b/tests/queries/0_stateless/00799_function_dry_run.reference @@ -1,9 +1,9 @@ 0.3 2018-11-19 13:00:00 \N 0.3 2018-11-19 13:05:00 \N 0.4 2018-11-19 13:10:00 1 -0.5 2018-11-19 13:15:00 1.5 -0.5 2018-11-19 13:30:00 2.2 -0.6 2018-11-19 13:15:00 1.3 -0.7 2018-11-19 13:20:00 1.8 -0.8 2018-11-19 13:25:00 2.4 -0.9 2018-11-19 13:25:00 2.1 +0.5 2018-11-19 13:15:00 1.2 +0.6 2018-11-19 13:20:00 1.5 +0.7 2018-11-19 13:25:00 1.8 +0.8 2018-11-19 13:30:00 2.1 +0.9 2018-11-19 13:45:00 2.4 +0.5 2018-11-19 13:50:00 2.2 diff --git a/tests/queries/0_stateless/00799_function_dry_run.sql b/tests/queries/0_stateless/00799_function_dry_run.sql index 946ac98044c..bf6fb3de395 100644 --- a/tests/queries/0_stateless/00799_function_dry_run.sql +++ b/tests/queries/0_stateless/00799_function_dry_run.sql @@ -4,7 +4,7 @@ DROP TABLE IF EXISTS bm; CREATE TABLE bm (amount float, business_dttm DateTime) engine Log; -INSERT INTO bm VALUES (0.3,'2018-11-19 13:00:00'), (0.3,'2018-11-19 13:05:00'), (0.4,'2018-11-19 13:10:00'), (0.5,'2018-11-19 13:15:00'), (0.6,'2018-11-19 13:15:00'), (0.7,'2018-11-19 13:20:00'), (0.8,'2018-11-19 13:25:00'), (0.9,'2018-11-19 13:25:00'), (0.5,'2018-11-19 13:30:00'); +INSERT INTO bm VALUES (0.3,'2018-11-19 13:00:00'), (0.3,'2018-11-19 13:05:00'), (0.4,'2018-11-19 13:10:00'), (0.5,'2018-11-19 13:15:00'), (0.6,'2018-11-19 13:20:00'), (0.7,'2018-11-19 13:25:00'), (0.8,'2018-11-19 13:30:00'), (0.9,'2018-11-19 13:45:00'), (0.5,'2018-11-19 13:50:00'); WITH ( @@ -30,6 +30,6 @@ FROM business_dttm FROM bm ORDER BY business_dttm -) ORDER BY amount, business_dttm; +) ORDER BY business_dttm; DROP TABLE bm; diff --git a/tests/queries/0_stateless/01031_new_any_join.reference b/tests/queries/0_stateless/01031_new_any_join.reference index 1fd9a5352e3..7b08703e422 100644 --- a/tests/queries/0_stateless/01031_new_any_join.reference +++ b/tests/queries/0_stateless/01031_new_any_join.reference @@ -7,10 +7,7 @@ any left any left (rev) 0 5 b6 2 a3 2 b1 -2 a3 2 b2 4 a5 4 b3 -4 a5 4 b4 -4 a5 4 b5 any inner 2 a3 2 b1 4 a5 4 b3 @@ -20,10 +17,7 @@ any inner (rev) any right 0 5 b6 2 a3 2 b1 -2 a3 2 b2 4 a5 4 b3 -4 a5 4 b4 -4 a5 4 b5 any right (rev) 0 a1 0 1 a2 0 diff --git a/tests/queries/0_stateless/01031_new_any_join.sql b/tests/queries/0_stateless/01031_new_any_join.sql index de86d8eebc5..2f2a8b2ad1d 100644 --- a/tests/queries/0_stateless/01031_new_any_join.sql +++ b/tests/queries/0_stateless/01031_new_any_join.sql @@ -5,7 +5,7 @@ CREATE TABLE t1 (x UInt32, s String) engine = Memory; CREATE TABLE t2 (x UInt32, s String) engine = Memory; INSERT INTO t1 (x, s) VALUES (0, 'a1'), (1, 'a2'), (2, 'a3'), (3, 'a4'), (4, 'a5'); -INSERT INTO t2 (x, s) VALUES (2, 'b1'), (2, 'b2'), (4, 'b3'), (4, 'b4'), (4, 'b5'), (5, 'b6'); +INSERT INTO t2 (x, s) VALUES (2, 'b1'), (4, 'b3'), (5, 'b6'); SET join_use_nulls = 0; SET any_join_distinct_right_table_keys = 0; diff --git a/tests/queries/0_stateless/01031_pmj_new_any_semi_join.reference b/tests/queries/0_stateless/01031_pmj_new_any_semi_join.reference index bec0f22c466..b48b20942c6 100644 --- a/tests/queries/0_stateless/01031_pmj_new_any_semi_join.reference +++ b/tests/queries/0_stateless/01031_pmj_new_any_semi_join.reference @@ -3,11 +3,10 @@ any left 1 a2 0 2 a3 2 b1 3 a4 0 -4 a5 4 b3 +4 a5 4 b2 any left (rev) 0 5 b4 2 a3 2 b1 -4 a5 4 b3 4 a5 4 b2 any inner 2 a3 2 b1 @@ -19,7 +18,6 @@ any right 0 5 b4 2 a3 2 b1 4 a5 4 b2 -4 a5 4 b3 any right (rev) 0 a1 0 1 a2 0 @@ -28,11 +26,10 @@ any right (rev) 4 a5 4 b2 semi left 2 a3 2 b1 -4 a5 4 b3 +4 a5 4 b2 semi right 2 a3 2 b1 4 a5 4 b2 -4 a5 4 b3 anti left 0 a1 0 1 a2 1 diff --git a/tests/queries/0_stateless/01031_pmj_new_any_semi_join.sql b/tests/queries/0_stateless/01031_pmj_new_any_semi_join.sql index 87cf3844f97..0a593b3cfa9 100644 --- a/tests/queries/0_stateless/01031_pmj_new_any_semi_join.sql +++ b/tests/queries/0_stateless/01031_pmj_new_any_semi_join.sql @@ -5,7 +5,7 @@ CREATE TABLE t1 (x UInt32, s String) engine = Memory; CREATE TABLE t2 (x UInt32, s String) engine = Memory; INSERT INTO t1 (x, s) VALUES (0, 'a1'), (1, 'a2'), (2, 'a3'), (3, 'a4'), (4, 'a5'); -INSERT INTO t2 (x, s) VALUES (2, 'b1'), (4, 'b2'), (4, 'b3'), (5, 'b4'); +INSERT INTO t2 (x, s) VALUES (2, 'b1'), (4, 'b2'), (5, 'b4'); SET join_algorithm = 'prefer_partial_merge'; SET join_use_nulls = 0; diff --git a/tests/queries/0_stateless/01142_with_ties_and_aliases.reference b/tests/queries/0_stateless/01142_with_ties_and_aliases.reference index 5d8b70ab48f..1846e07a908 100644 --- a/tests/queries/0_stateless/01142_with_ties_and_aliases.reference +++ b/tests/queries/0_stateless/01142_with_ties_and_aliases.reference @@ -8,11 +8,11 @@ 1 1 1 -4 -3 +0 1 2 -0 +3 +4 0 0 0 1 0 2 diff --git a/tests/queries/0_stateless/01142_with_ties_and_aliases.sql b/tests/queries/0_stateless/01142_with_ties_and_aliases.sql index d3ca4e06ae2..de4a9281a08 100644 --- a/tests/queries/0_stateless/01142_with_ties_and_aliases.sql +++ b/tests/queries/0_stateless/01142_with_ties_and_aliases.sql @@ -5,7 +5,7 @@ create table wt (a Int, b Int) engine = Memory; insert into wt select 0, number from numbers(5); select 1 from wt order by a limit 3 with ties; -select b from wt order by a limit 3 with ties; +select b from (select b from wt order by a limit 3 with ties) order by b; select * from (select * from (with a * 2 as c select a, b from wt order by c limit 3 with ties) order by a, b); select * from (select * from (select a * 2 as c, b from wt order by c limit 3 with ties) order by c, b); diff --git a/tests/queries/0_stateless/01670_neighbor_lc_bug.reference b/tests/queries/0_stateless/01670_neighbor_lc_bug.reference index b28e8d90caa..fd1bc1a154c 100644 --- a/tests/queries/0_stateless/01670_neighbor_lc_bug.reference +++ b/tests/queries/0_stateless/01670_neighbor_lc_bug.reference @@ -9,7 +9,7 @@ 1 1 1 2 2 2 ┌─rowNr─┬─val_string─┬─str_m1───┬─str_p1───┬─val_low──┬─low_m1───┬─low_p1───┐ -│ 1 │ String 1 │ String 1 │ String 2 │ String 1 │ String 1 │ String 2 │ -│ 2 │ String 1 │ │ String 1 │ String 1 │ │ String 1 │ +│ 1 │ String 1 │ │ String 1 │ String 1 │ │ String 1 │ +│ 2 │ String 1 │ String 1 │ String 2 │ String 1 │ String 1 │ String 2 │ │ 3 │ String 2 │ String 1 │ │ String 2 │ String 1 │ │ └───────┴────────────┴──────────┴──────────┴──────────┴──────────┴──────────┘ diff --git a/tests/queries/0_stateless/01670_neighbor_lc_bug.sql b/tests/queries/0_stateless/01670_neighbor_lc_bug.sql index ad24dc0fe33..9de544b111d 100644 --- a/tests/queries/0_stateless/01670_neighbor_lc_bug.sql +++ b/tests/queries/0_stateless/01670_neighbor_lc_bug.sql @@ -39,7 +39,7 @@ FROM FROM neighbor_test ORDER BY val_string ASC ) -ORDER By rowNr +ORDER BY rowNr, val_string, str_m1, str_p1, val_low, low_m1, low_p1 format PrettyCompact; drop table if exists neighbor_test;