ClickHouse/tests/queries/0_stateless/02955_analyzer_using_functional_args.reference.j2
2024-03-23 11:05:20 +00:00

93 lines
2.9 KiB
Django/Jinja

{% for column_expression_type in ['ALIAS', 'MATERIALIZED'] -%}
{{ column_expression_type }}
1
1
369 124 123 b
369 124 123 b
124
3693 1231 a 1231
3693 1232 1231 1231 a
a
-- { echoOn }
-- USING alias column contains default in old analyzer (but both queries below should have the same result)
SELECT y * 2, s || 'a' FROM t1 FULL JOIN t2 USING (y) ORDER BY ALL SETTINGS allow_experimental_analyzer = 1;
738 ba
7386 aa
13332 a
SELECT y * 2, s || 'a' FROM (SELECT s, y FROM t1) t1 FULL JOIN (SELECT y FROM t2) t2 USING (y) ORDER BY ALL;
738 ba
7386 aa
13332 a
SELECT (1, *) FROM t1 FULL JOIN t2 USING (y) ORDER BY ALL SETTINGS allow_experimental_analyzer = 1;
(1,369,123,'b',124)
(1,3693,1231,'a',0)
(1,6666,0,'',48)
SELECT (1, *) FROM (SELECT s, y FROM t1) t1 FULL JOIN (SELECT y FROM t2) t2 USING (y) ORDER BY ALL SETTINGS allow_experimental_analyzer = 1;
(1,369,'b')
(1,3693,'a')
(1,6666,'')
SELECT (1, t1.*) FROM t1 FULL JOIN t2 USING (y) ORDER BY ALL;
(1,0,'')
(1,123,'b')
(1,1231,'a')
SELECT (1, t1.*) FROM (SELECT s, y FROM t1) t1 FULL JOIN (SELECT y FROM t2) t2 USING (y) ORDER BY ALL;
(1,'',6666)
(1,'a',3693)
(1,'b',369)
SELECT (1, t1.*, t2.*) FROM t1 FULL JOIN t2 USING (y) ORDER BY ALL;
(1,0,'',6666,48)
(1,123,'b',369,124)
(1,1231,'a',0,0)
SELECT (1, t1.*, t2.*) FROM (SELECT s, y FROM t1) t1 FULL JOIN (SELECT y FROM t2) t2 USING (y) ORDER BY ALL;
(1,'',0,6666)
(1,'a',3693,0)
(1,'b',369,369)
SELECT t1.z, t2.z, t3.z FROM t1 FULL JOIN t2 USING (y) FULL JOIN t3 USING (y) ORDER BY 1,2,3 SETTINGS allow_experimental_analyzer = 1;
0 0 43
0 48 0
124 124 0
1232 0 1232
SELECT * FROM t1 FULL JOIN t2 USING (y) FULL JOIN t3 USING (y) ORDER BY 1,2,3 SETTINGS allow_experimental_analyzer = 1;
126 0 0 42
369 123 b 124 0
3693 1231 a 0 1231
6666 0 48 0
SELECT t1.*, t2.*, t3.* FROM t1 FULL JOIN t2 USING (y) FULL JOIN t3 USING (y) ORDER BY 1,2,3 SETTINGS allow_experimental_analyzer = 1;
0 126 0 42
0 6666 48 0
123 b 369 124 0
1231 a 3693 0 1231
SELECT (1, t1.*, t2.*, t3.*) FROM t1 FULL JOIN t2 USING (y) FULL JOIN t3 USING (y) ORDER BY 1 SETTINGS allow_experimental_analyzer = 1;
(1,0,'',126,0,42)
(1,0,'',6666,48,0)
(1,123,'b',369,124,0)
(1,1231,'a',3693,0,1231)
SELECT y FROM t1 FULL JOIN t2 USING (y) ORDER BY ALL SETTINGS allow_experimental_analyzer = 1;
369
3693
6666
SELECT y FROM (SELECT s, y FROM t1) t1 FULL JOIN (SELECT y FROM t2) t2 USING (y) ORDER BY ALL;
369
3693
6666
SELECT s FROM t1 FULL JOIN t2 USING (y) ORDER BY ALL;
a
b
SELECT s FROM (SELECT s, y FROM t1) t1 FULL JOIN (SELECT y FROM t2) t2 USING (y) ORDER BY ALL;
a
b
SELECT y FROM t1 FULL JOIN t2 USING (y) PREWHERE y * 2 > 2 ORDER BY ALL SETTINGS allow_experimental_analyzer = 1, join_use_nulls = 0;
369
3693
6666
SELECT y FROM t1 FULL JOIN t2 USING (y) PREWHERE y * 2 > 2 ORDER BY ALL SETTINGS allow_experimental_analyzer = 1, join_use_nulls = 1;
369
3693
6666
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
{% endfor -%}