forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ClickHouse#44716 from ClickHouse/vdimir/merge_engi…
…ne_nullable
- Loading branch information
Showing
3 changed files
with
54 additions
and
1 deletion.
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
Empty file.
18 changes: 18 additions & 0 deletions
18
tests/queries/0_stateless/02518_merge_engine_nullable_43324.sql
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,18 @@ | ||
|
||
DROP TABLE IF EXISTS foo; | ||
DROP TABLE IF EXISTS foo__fuzz_0; | ||
DROP TABLE IF EXISTS foo_merge; | ||
|
||
CREATE TABLE foo (`Id` Int32, `Val` Int32) ENGINE = MergeTree ORDER BY Id; | ||
CREATE TABLE foo__fuzz_0 (`Id` Int64, `Val` Nullable(Int32)) ENGINE = MergeTree ORDER BY Id; | ||
|
||
INSERT INTO foo SELECT number, number % 5 FROM numbers(10); | ||
INSERT INTO foo__fuzz_0 SELECT number, number % 5 FROM numbers(10); | ||
|
||
CREATE TABLE merge1 AS foo ENGINE = Merge(currentDatabase(), '^foo'); | ||
CREATE TABLE merge2 (`Id` Int32, `Val` Int32) ENGINE = Merge(currentDatabase(), '^foo'); | ||
CREATE TABLE merge3 (`Id` Int32, `Val` Int32) ENGINE = Merge(currentDatabase(), '^foo__fuzz_0'); | ||
|
||
SELECT * FROM merge1 WHERE Val = 3 AND Val = 1; | ||
SELECT * FROM merge2 WHERE Val = 3 AND Val = 1; | ||
SELECT * FROM merge3 WHERE Val = 3 AND Val = 1; |