forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a742b23
commit 532d72a
Showing
6 changed files
with
86 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<test> | ||
<settings> | ||
<max_insert_threads>8</max_insert_threads> | ||
<max_threads>1</max_threads> | ||
</settings> | ||
|
||
<create_query> | ||
CREATE TABLE t_nullable | ||
( | ||
key_string1 Nullable(String), | ||
key_string2 Nullable(String), | ||
key_string3 Nullable(String), | ||
key_int64_1 Nullable(Int64), | ||
key_int64_2 Nullable(Int64), | ||
key_int64_3 Nullable(Int64), | ||
key_int64_4 Nullable(Int64), | ||
key_int64_5 Nullable(Int64), | ||
m1 Int64, | ||
m2 Int64 | ||
) | ||
ENGINE = Memory | ||
</create_query> | ||
<fill_query>insert into t_nullable select ['aaaaaa','bbaaaa','ccaaaa','ddaaaa'][number % 101 + 1], ['aa','bb','cc','dd'][number % 100 + 1], ['aa','bb','cc','dd'][number % 102 + 1], number%10+1, number%10+2, number%10+3, number%10+4,number%10+5, number%6000+1, number%5000+2 from numbers_mt(30000000)</fill_query> | ||
<query>select * from t_nullable where key_string1 in ('aaaaaa') format Null</query> | ||
<query>select * from t_nullable where key_string1 in ('aaaaaa') format Null SETTINGS allow_experimental_analyzer=1</query> | ||
<query>select * from t_nullable where key_string2 in ('3') format Null</query> | ||
<query>select * from t_nullable where key_string2 in ('3') format Null SETTINGS allow_experimental_analyzer=1</query> | ||
<drop_query>drop table if exists t_nullable</drop_query> | ||
|
||
</test> |
37 changes: 37 additions & 0 deletions
37
tests/queries/0_stateless/03013_optimize_in_to_equal.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
a 1 | ||
------------------- | ||
QUERY id: 0 | ||
PROJECTION COLUMNS | ||
x String | ||
y Int32 | ||
PROJECTION | ||
LIST id: 1, nodes: 2 | ||
COLUMN id: 2, column_name: x, result_type: String, source_id: 3 | ||
COLUMN id: 4, column_name: y, result_type: Int32, source_id: 3 | ||
JOIN TREE | ||
TABLE id: 3, alias: __table1, table_name: default.test | ||
WHERE | ||
FUNCTION id: 5, function_name: equals, function_type: ordinary, result_type: UInt8 | ||
ARGUMENTS | ||
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 | ||
x String | ||
y Int32 | ||
PROJECTION | ||
LIST id: 1, nodes: 2 | ||
COLUMN id: 2, column_name: x, result_type: String, source_id: 3 | ||
COLUMN id: 4, column_name: y, result_type: Int32, source_id: 3 | ||
JOIN TREE | ||
TABLE id: 3, alias: __table1, table_name: default.test | ||
WHERE | ||
FUNCTION id: 5, function_name: in, function_type: ordinary, result_type: UInt8 | ||
ARGUMENTS | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
DROP TABLE IF EXISTS test; | ||
CREATE TABLE test (x String, y Int32) ENGINE = MergeTree() ORDER BY x; | ||
|
||
INSERT INTO test VALUES ('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5); | ||
|
||
select * from test where x in ('a') SETTINGS allow_experimental_analyzer = 1; | ||
select '-------------------'; | ||
explain query tree select * from test where x in ('a') SETTINGS allow_experimental_analyzer = 1; | ||
select '-------------------'; | ||
explain query tree select * from test where x in ('a','b') SETTINGS allow_experimental_analyzer = 1; |