Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add join keys convertion for nested lowcardinality
- Loading branch information
Showing
3 changed files
with
43 additions
and
2 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
4 changes: 4 additions & 0 deletions
4
tests/queries/0_stateless/02797_join_nested_lowcardinality_convert.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,4 @@ | ||
[0] [0] | ||
[0] [0] | ||
[0] [0] | ||
[0] [0] |
37 changes: 37 additions & 0 deletions
37
tests/queries/0_stateless/02797_join_nested_lowcardinality_convert.sql.j2
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 @@ | ||
|
||
|
||
DROP TABLE IF EXISTS test1__fuzz_36; | ||
DROP TABLE IF EXISTS test1__fuzz_38; | ||
DROP TABLE IF EXISTS test1__fuzz_41; | ||
|
||
CREATE TABLE test1__fuzz_36 (`pt` Array(Array(LowCardinality(Int256))), `exposure_uv` UInt32) ENGINE = Memory; | ||
CREATE TABLE test1__fuzz_38 (`pt` Array(Array(Int256)), `exposure_uv` UInt32) ENGINE = Memory; | ||
CREATE TABLE test1__fuzz_41 (`pt` Array(Array(Int8)), `exposure_uv` Decimal(76, 39)) ENGINE = Memory; | ||
|
||
insert into test1__fuzz_36 select * from generateRandom() limit 10; | ||
insert into test1__fuzz_38 select * from generateRandom() limit 10; | ||
insert into test1__fuzz_41 select * from generateRandom() limit 10; | ||
|
||
{% for join_algorithm in ['default','grace_hash','partial_merge','full_sorting_merge'] -%} | ||
|
||
SET join_algorithm = '{{ join_algorithm }}'; | ||
|
||
SELECT * | ||
FROM (SELECT materialize([0] :: Array(LowCardinality(Int64))) as pt) AS m0 | ||
LEFT JOIN (SELECT materialize([0] :: Array(Int64)) as pt) AS m2 | ||
ON m0.pt = m2.pt | ||
; | ||
|
||
SELECT * FROM ( | ||
SELECT m0.pt, m0.exposure_uv AS exposure_uv, round(m2.exposure_uv, 10) FROM (SELECT pt, exposure_uv FROM test1__fuzz_36) AS m0 | ||
LEFT JOIN (SELECT pt, exposure_uv FROM test1__fuzz_38) AS m1 ON m0.pt = m1.pt LEFT JOIN (SELECT pt, exposure_uv FROM test1__fuzz_41) AS m2 | ||
ON m0.pt = m2.pt | ||
) AS c0 | ||
ORDER BY exposure_uv ASC NULLS LAST | ||
FORMAT Null SETTINGS join_use_nulls = 1; | ||
|
||
{% endfor -%} | ||
|
||
DROP TABLE IF EXISTS test1__fuzz_36; | ||
DROP TABLE IF EXISTS test1__fuzz_38; | ||
DROP TABLE IF EXISTS test1__fuzz_41; |