mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #26118 from vdimir/issue-25993-join-get-lc
Do not use default impl for low cardinality for joinGet
This commit is contained in:
commit
f48c5af90c
@ -28,7 +28,7 @@ public:
|
||||
static constexpr auto name = or_null ? "joinGetOrNull" : "joinGet";
|
||||
|
||||
bool useDefaultImplementationForNulls() const override { return false; }
|
||||
bool useDefaultImplementationForLowCardinalityColumns() const override { return true; }
|
||||
bool useDefaultImplementationForLowCardinalityColumns() const override { return false; }
|
||||
bool useDefaultImplementationForConstants() const override { return true; }
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override;
|
||||
|
@ -1 +1,6 @@
|
||||
yyy
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user