mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #11869 from ClickHouse/fix-nullable-prewhere-type-2
Fix nullable prewhere type 2
This commit is contained in:
commit
a7b224a578
@ -320,7 +320,6 @@ void MergeTreeBaseSelectProcessor::executePrewhereActions(Block & block, const P
|
||||
else
|
||||
{
|
||||
auto & ctn = block.getByName(prewhere_info->prewhere_column_name);
|
||||
ctn.type = std::make_shared<DataTypeUInt8>();
|
||||
ctn.column = ctn.type->createColumnConst(block.rows(), 1u)->convertToFullColumnIfConst();
|
||||
}
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
43
|
||||
1
|
||||
Nullable(UInt8) Nullable(Int32)
|
||||
|
@ -12,6 +12,7 @@ CREATE TABLE test_prewhere_column_type (`a` LowCardinality(String), `x` Nullable
|
||||
INSERT INTO test_prewhere_column_type VALUES ('', 2);
|
||||
|
||||
SELECT a, y FROM test_prewhere_column_type prewhere (x = 2) AS y;
|
||||
SELECT a, toTypeName(x = 2), toTypeName(x) FROM test_prewhere_column_type where (x = 2) AS y;
|
||||
|
||||
DROP TABLE test_prewhere_default_column;
|
||||
DROP TABLE test_prewhere_column_type;
|
||||
|
Loading…
Reference in New Issue
Block a user