Skip to content

Commit

Permalink
remove duplicated SETTINGS statement
Browse files Browse the repository at this point in the history
  • Loading branch information
yariks5s authored Mar 22, 2024
1 parent 5d5f073 commit 97bd6ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
10 changes: 0 additions & 10 deletions tests/queries/0_stateless/03013_optimize_in_to_equal.reference
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ QUERY id: 0
LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: \'a\', constant_value_type: String
SETTINGS allow_experimental_analyzer=1
-------------------
QUERY id: 0
PROJECTION COLUMNS
Expand All @@ -43,7 +42,6 @@ QUERY id: 0
ARGUMENTS
LIST id: 10, nodes: 1
CONSTANT id: 11, constant_value: \'a\', constant_value_type: String
SETTINGS allow_experimental_analyzer=1
-------------------
QUERY id: 0
PROJECTION COLUMNS
Expand All @@ -61,7 +59,6 @@ QUERY id: 0
LIST id: 6, nodes: 2
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)
SETTINGS allow_experimental_analyzer=1
-------------------
QUERY id: 0
PROJECTION COLUMNS
Expand All @@ -79,7 +76,6 @@ QUERY id: 0
LIST id: 6, nodes: 2
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)
SETTINGS allow_experimental_analyzer=1
-------------------
b 2
c 3
Expand All @@ -100,7 +96,6 @@ QUERY id: 0
LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: \'a\', constant_value_type: String
SETTINGS allow_experimental_analyzer=1
-------------------
QUERY id: 0
PROJECTION COLUMNS
Expand All @@ -123,7 +118,6 @@ QUERY id: 0
ARGUMENTS
LIST id: 10, nodes: 1
CONSTANT id: 11, constant_value: \'a\', constant_value_type: String
SETTINGS allow_experimental_analyzer=1
-------------------
QUERY id: 0
PROJECTION COLUMNS
Expand All @@ -141,7 +135,6 @@ QUERY id: 0
LIST id: 6, nodes: 2
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)
SETTINGS allow_experimental_analyzer=1
-------------------
QUERY id: 0
PROJECTION COLUMNS
Expand All @@ -159,7 +152,6 @@ QUERY id: 0
LIST id: 6, nodes: 2
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)
SETTINGS allow_experimental_analyzer=1
-------------------
QUERY id: 0
PROJECTION COLUMNS
Expand All @@ -177,7 +169,6 @@ QUERY id: 0
LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: NULL, constant_value_type: Nullable(Nothing)
SETTINGS allow_experimental_analyzer=1
-------------------
QUERY id: 0
PROJECTION COLUMNS
Expand All @@ -195,4 +186,3 @@ QUERY id: 0
LIST id: 6, nodes: 2
COLUMN id: 7, column_name: x, result_type: String, source_id: 3
CONSTANT id: 8, constant_value: NULL, constant_value_type: Nullable(Nothing)
SETTINGS allow_experimental_analyzer=1
25 changes: 13 additions & 12 deletions tests/queries/0_stateless/03013_optimize_in_to_equal.sql
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
DROP TABLE IF EXISTS test;
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);
select * from test where x in ('a') SETTINGS allow_experimental_analyzer = 1;
select * from test where x in ('a');
select '-------------------';
select x in Null from test;
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 '-------------------';
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 '-------------------';
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 '-------------------';
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 * from test where x not in ('a') SETTINGS allow_experimental_analyzer = 1;
select * from test where x not in ('a');
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 '-------------------';
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 '-------------------';
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 '-------------------';
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 '-------------------';
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 '-------------------';
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);

0 comments on commit 97bd6ec

Please sign in to comment.