Add test to join_get_low_card_fix

This commit is contained in:
vdimir 2021-07-09 12:20:36 +03:00
parent 95f8ca4e03
commit 43880af722
No known key found for this signature in database
GPG Key ID: F57B3E10A21DBB31
2 changed files with 16 additions and 6 deletions

View File

@ -1 +1,6 @@
yyy 1
1
1
1
1
1

View File

@ -1,9 +1,14 @@
drop table if exists join_tbl; DROP TABLE IF EXISTS join_tbl;
create table join_tbl (`id` String, `name` String) engine Join(any, left, id); CREATE TABLE join_tbl (`id` String, `name` String, lcname LowCardinality(String)) ENGINE = Join(any, left, id);
insert into join_tbl values ('xxx', 'yyy'); INSERT INTO join_tbl VALUES ('xxx', 'yyy', 'yyy');
select joinGet('join_tbl', 'name', toLowCardinality('xxx')); SELECT joinGet('join_tbl', 'name', 'xxx') == 'yyy';
SELECT joinGet('join_tbl', 'name', toLowCardinality('xxx')) == 'yyy';
SELECT joinGet('join_tbl', 'name', toLowCardinality(materialize('xxx'))) == 'yyy';
SELECT joinGet('join_tbl', 'lcname', 'xxx') == 'yyy';
SELECT joinGet('join_tbl', 'lcname', toLowCardinality('xxx')) == 'yyy';
SELECT joinGet('join_tbl', 'lcname', toLowCardinality(materialize('xxx'))) == 'yyy';
drop table if exists join_tbl; DROP TABLE IF EXISTS join_tbl;