mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Fix set index with const column pred
This commit is contained in:
parent
b0ffde5825
commit
ae2c50e9e8
@ -291,7 +291,8 @@ bool MergeTreeIndexConditionSet::mayBeTrueOnGranule(MergeTreeIndexGranulePtr idx
|
|||||||
Block result = granule->block;
|
Block result = granule->block;
|
||||||
actions->execute(result);
|
actions->execute(result);
|
||||||
|
|
||||||
auto column = result.getByName(expression_ast->getColumnName()).column->convertToFullColumnIfLowCardinality();
|
auto column
|
||||||
|
= result.getByName(expression_ast->getColumnName()).column->convertToFullColumnIfConst()->convertToFullColumnIfLowCardinality();
|
||||||
const auto * col_uint8 = typeid_cast<const ColumnUInt8 *>(column.get());
|
const auto * col_uint8 = typeid_cast<const ColumnUInt8 *>(column.get());
|
||||||
|
|
||||||
const NullMap * null_map = nullptr;
|
const NullMap * null_map = nullptr;
|
||||||
|
1
tests/queries/0_stateless/01450_set_null_const.reference
Normal file
1
tests/queries/0_stateless/01450_set_null_const.reference
Normal file
@ -0,0 +1 @@
|
|||||||
|
0
|
7
tests/queries/0_stateless/01450_set_null_const.sql
Normal file
7
tests/queries/0_stateless/01450_set_null_const.sql
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
DROP TABLE IF EXISTS test_mtree;
|
||||||
|
|
||||||
|
CREATE TABLE test_mtree (`x` String, INDEX idx x TYPE set(10) GRANULARITY 1) ENGINE = MergeTree ORDER BY tuple();
|
||||||
|
INSERT INTO test_mtree VALUES ('Hello, world');
|
||||||
|
SELECT count() FROM test_mtree WHERE x = NULL;
|
||||||
|
|
||||||
|
DROP TABLE test_mtree;
|
Loading…
Reference in New Issue
Block a user