remove duplicated SETTINGS statement

This commit is contained in:
Yarik Briukhovetskyi 2024-03-22 16:00:53 +01:00 committed by GitHub
parent 5d5f073bab
commit 97bd6ecfc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 22 deletions

View File

@ -20,7 +20,6 @@ QUERY id: 0
LIST id: 6, nodes: 2 LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3 COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: \'a\', constant_value_type: String CONSTANT id: 8, constant_value: \'a\', constant_value_type: String
SETTINGS allow_experimental_analyzer=1
------------------- -------------------
QUERY id: 0 QUERY id: 0
PROJECTION COLUMNS PROJECTION COLUMNS
@ -43,7 +42,6 @@ QUERY id: 0
ARGUMENTS ARGUMENTS
LIST id: 10, nodes: 1 LIST id: 10, nodes: 1
CONSTANT id: 11, constant_value: \'a\', constant_value_type: String CONSTANT id: 11, constant_value: \'a\', constant_value_type: String
SETTINGS allow_experimental_analyzer=1
------------------- -------------------
QUERY id: 0 QUERY id: 0
PROJECTION COLUMNS PROJECTION COLUMNS
@ -61,7 +59,6 @@ QUERY id: 0
LIST id: 6, nodes: 2 LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3 COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: Tuple_(\'a\', \'b\'), constant_value_type: Tuple(String, String) CONSTANT id: 8, constant_value: Tuple_(\'a\', \'b\'), constant_value_type: Tuple(String, String)
SETTINGS allow_experimental_analyzer=1
------------------- -------------------
QUERY id: 0 QUERY id: 0
PROJECTION COLUMNS PROJECTION COLUMNS
@ -79,7 +76,6 @@ QUERY id: 0
LIST id: 6, nodes: 2 LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3 COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: Array_[\'a\', \'b\'], constant_value_type: Array(String) CONSTANT id: 8, constant_value: Array_[\'a\', \'b\'], constant_value_type: Array(String)
SETTINGS allow_experimental_analyzer=1
------------------- -------------------
b 2 b 2
c 3 c 3
@ -100,7 +96,6 @@ QUERY id: 0
LIST id: 6, nodes: 2 LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3 COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: \'a\', constant_value_type: String CONSTANT id: 8, constant_value: \'a\', constant_value_type: String
SETTINGS allow_experimental_analyzer=1
------------------- -------------------
QUERY id: 0 QUERY id: 0
PROJECTION COLUMNS PROJECTION COLUMNS
@ -123,7 +118,6 @@ QUERY id: 0
ARGUMENTS ARGUMENTS
LIST id: 10, nodes: 1 LIST id: 10, nodes: 1
CONSTANT id: 11, constant_value: \'a\', constant_value_type: String CONSTANT id: 11, constant_value: \'a\', constant_value_type: String
SETTINGS allow_experimental_analyzer=1
------------------- -------------------
QUERY id: 0 QUERY id: 0
PROJECTION COLUMNS PROJECTION COLUMNS
@ -141,7 +135,6 @@ QUERY id: 0
LIST id: 6, nodes: 2 LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3 COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: Tuple_(\'a\', \'b\'), constant_value_type: Tuple(String, String) CONSTANT id: 8, constant_value: Tuple_(\'a\', \'b\'), constant_value_type: Tuple(String, String)
SETTINGS allow_experimental_analyzer=1
------------------- -------------------
QUERY id: 0 QUERY id: 0
PROJECTION COLUMNS PROJECTION COLUMNS
@ -159,7 +152,6 @@ QUERY id: 0
LIST id: 6, nodes: 2 LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3 COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: Array_[\'a\', \'b\'], constant_value_type: Array(String) CONSTANT id: 8, constant_value: Array_[\'a\', \'b\'], constant_value_type: Array(String)
SETTINGS allow_experimental_analyzer=1
------------------- -------------------
QUERY id: 0 QUERY id: 0
PROJECTION COLUMNS PROJECTION COLUMNS
@ -177,7 +169,6 @@ QUERY id: 0
LIST id: 6, nodes: 2 LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3 COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: NULL, constant_value_type: Nullable(Nothing) CONSTANT id: 8, constant_value: NULL, constant_value_type: Nullable(Nothing)
SETTINGS allow_experimental_analyzer=1
------------------- -------------------
QUERY id: 0 QUERY id: 0
PROJECTION COLUMNS PROJECTION COLUMNS
@ -195,4 +186,3 @@ QUERY id: 0
LIST id: 6, nodes: 2 LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3 COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: NULL, constant_value_type: Nullable(Nothing) CONSTANT id: 8, constant_value: NULL, constant_value_type: Nullable(Nothing)
SETTINGS allow_experimental_analyzer=1

View File

@ -1,28 +1,29 @@
DROP TABLE IF EXISTS test; DROP TABLE IF EXISTS test;
CREATE TABLE test (x String, y Int32) ENGINE = MergeTree() ORDER BY x; CREATE TABLE test (x String, y Int32) ENGINE = MergeTree() ORDER BY x;
SET allow_experimental_analyzer = 1;
INSERT INTO test VALUES ('a', 1), ('b', 2), ('c', 3); INSERT INTO test VALUES ('a', 1), ('b', 2), ('c', 3);
select * from test where x in ('a') SETTINGS allow_experimental_analyzer = 1; select * from test where x in ('a');
select '-------------------'; select '-------------------';
select x in Null from test; select x in Null from test;
select '-------------------'; select '-------------------';
explain query tree select * from test where x in ('a') SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x in ('a');
select '-------------------'; select '-------------------';
explain query tree select * from test where x in (upper('a')) SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x in (upper('a'));
select '-------------------'; select '-------------------';
explain query tree select * from test where x in ('a','b') SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x in ('a','b');
select '-------------------'; select '-------------------';
explain query tree select * from test where x in ['a','b'] SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x in ['a','b'];
select '-------------------'; select '-------------------';
select * from test where x not in ('a') SETTINGS allow_experimental_analyzer = 1; select * from test where x not in ('a');
select '-------------------'; select '-------------------';
explain query tree select * from test where x not in ('a') SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x not in ('a');
select '-------------------'; select '-------------------';
explain query tree select * from test where x not in (upper('a')) SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x not in (upper('a'));
select '-------------------'; select '-------------------';
explain query tree select * from test where x not in ('a','b') SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x not in ('a','b');
select '-------------------'; select '-------------------';
explain query tree select * from test where x not in ['a','b'] SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x not in ['a','b'];
select '-------------------'; select '-------------------';
explain query tree select * from test where x not in (NULL) SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x not in (NULL);
select '-------------------'; select '-------------------';
explain query tree select * from test where x in (NULL) SETTINGS allow_experimental_analyzer = 1; explain query tree select * from test where x in (NULL);