mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Add cases to test view_persist_settings
This commit is contained in:
parent
3193e5358f
commit
4a48c483cc
@ -1,8 +1,24 @@
|
||||
1 11 0
|
||||
1 12 0
|
||||
2 11 22
|
||||
2 11 23
|
||||
2 12 22
|
||||
2 12 23
|
||||
3 0 22
|
||||
3 0 23
|
||||
1 11 0
|
||||
2 12 22
|
||||
3 0 23
|
||||
1 11 \N
|
||||
2 12 22
|
||||
3 \N 23
|
||||
1 11 \N
|
||||
2 12 22
|
||||
3 \N 23
|
||||
1 11 0
|
||||
2 12 22
|
||||
3 0 23
|
||||
1 11 0
|
||||
2 12 22
|
||||
3 0 23
|
||||
1 11 \N
|
||||
2 12 22
|
||||
3 \N 23
|
||||
1 11 \N
|
||||
2 12 22
|
||||
3 \N 23
|
||||
|
@ -1,16 +1,49 @@
|
||||
DROP TABLE IF EXISTS some_test_view;
|
||||
DROP TABLE IF EXISTS view_no_nulls;
|
||||
DROP TABLE IF EXISTS view_no_nulls_set;
|
||||
DROP TABLE IF EXISTS view_nulls_set;
|
||||
DROP TABLE IF EXISTS view_nulls;
|
||||
|
||||
SET join_use_nulls = 0;
|
||||
|
||||
CREATE OR REPLACE VIEW some_test_view
|
||||
AS
|
||||
SELECT * FROM ( SELECT arrayJoin([1, 2]) AS a, arrayJoin([11, 12]) AS b ) AS t1
|
||||
FULL JOIN ( SELECT arrayJoin([2, 3]) AS a, arrayJoin([22, 23]) AS c ) AS t2
|
||||
USING a
|
||||
ORDER BY a;
|
||||
CREATE OR REPLACE VIEW view_no_nulls AS
|
||||
SELECT * FROM ( SELECT number + 1 AS a, number + 11 AS b FROM numbers(2) ) AS t1
|
||||
FULL JOIN ( SELECT number + 2 AS a, number + 22 AS c FROM numbers(2) ) AS t2
|
||||
USING a ORDER BY a;
|
||||
|
||||
CREATE OR REPLACE VIEW view_nulls_set AS
|
||||
SELECT * FROM ( SELECT number + 1 AS a, number + 11 AS b FROM numbers(2) ) AS t1
|
||||
FULL JOIN ( SELECT number + 2 AS a, number + 22 AS c FROM numbers(2) ) AS t2
|
||||
USING a ORDER BY a
|
||||
SETTINGS join_use_nulls = 1;
|
||||
|
||||
SET join_use_nulls = 1;
|
||||
|
||||
SELECT * from some_test_view;
|
||||
CREATE OR REPLACE VIEW view_nulls AS
|
||||
SELECT * FROM ( SELECT number + 1 AS a, number + 11 AS b FROM numbers(2) ) AS t1
|
||||
FULL JOIN ( SELECT number + 2 AS a, number + 22 AS c FROM numbers(2) ) AS t2
|
||||
USING a ORDER BY a;
|
||||
|
||||
DROP TABLE some_test_view;
|
||||
CREATE OR REPLACE VIEW view_no_nulls_set AS
|
||||
SELECT * FROM ( SELECT number + 1 AS a, number + 11 AS b FROM numbers(2) ) AS t1
|
||||
FULL JOIN ( SELECT number + 2 AS a, number + 22 AS c FROM numbers(2) ) AS t2
|
||||
USING a ORDER BY a
|
||||
SETTINGS join_use_nulls = 0;
|
||||
|
||||
SET join_use_nulls = 1;
|
||||
|
||||
SELECT * from view_no_nulls;
|
||||
SELECT * from view_no_nulls_set;
|
||||
SELECT * from view_nulls_set;
|
||||
SELECT * from view_nulls;
|
||||
|
||||
SET join_use_nulls = 0;
|
||||
|
||||
SELECT * from view_no_nulls;
|
||||
SELECT * from view_no_nulls_set;
|
||||
SELECT * from view_nulls_set;
|
||||
SELECT * from view_nulls;
|
||||
|
||||
DROP TABLE IF EXISTS view_no_nulls;
|
||||
DROP TABLE IF EXISTS view_no_nulls_set;
|
||||
DROP TABLE IF EXISTS view_nulls_set;
|
||||
DROP TABLE IF EXISTS view_nulls;
|
||||
|
Loading…
Reference in New Issue
Block a user