mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Fix Set index with constant nullable comparison.
This commit is contained in:
parent
5867f39fc7
commit
e4f057e304
@ -554,7 +554,7 @@ void MergeTreeIndexConditionSet::traverseAST(ASTPtr & node) const
|
||||
if (atomFromAST(node))
|
||||
{
|
||||
if (node->as<ASTIdentifier>() || node->as<ASTFunction>())
|
||||
node = makeASTFunction("__bitWrapperFunc", node);
|
||||
else
|
||||
}
|
||||
else
|
||||
node = std::make_shared<ASTLiteral>(UNKNOWN_FIELD);
|
||||
|
@ -0,0 +1 @@
|
||||
v1 v2
|
@ -0,0 +1,14 @@
|
||||
CREATE OR REPLACE TABLE test_table
|
||||
(
|
||||
col1 String,
|
||||
col2 String,
|
||||
INDEX test_table_col2_idx col2 TYPE set(0) GRANULARITY 1
|
||||
) ENGINE = MergeTree()
|
||||
ORDER BY col1
|
||||
AS SELECT 'v1', 'v2';
|
||||
|
||||
SELECT * FROM test_table
|
||||
WHERE 1 == 1 AND col1 == col1 OR
|
||||
0 AND col2 == NULL;
|
||||
|
||||
drop table if exists test_table;
|
Loading…
Reference in New Issue
Block a user