mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
fix prewhere with virtuals columns
This commit is contained in:
parent
9b9a5d9dc8
commit
1a6d2bc538
@ -330,9 +330,6 @@ void MergeTreeBaseSelectProcessor::executePrewhereActions(Block & block, const P
|
||||
auto & ctn = block.getByName(prewhere_info->prewhere_column_name);
|
||||
ctn.column = ctn.type->createColumnConst(block.rows(), 1u)->convertToFullColumnIfConst();
|
||||
}
|
||||
|
||||
if (!block)
|
||||
block.insert({nullptr, std::make_shared<DataTypeNothing>(), "_nothing"});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
1_2_2_0 4
|
||||
2_3_3_0 3
|
||||
0_1_1_0
|
12
tests/queries/0_stateless/01511_prewhere_with_virtuals.sql
Normal file
12
tests/queries/0_stateless/01511_prewhere_with_virtuals.sql
Normal file
@ -0,0 +1,12 @@
|
||||
DROP TABLE IF EXISTS test_not_found_column_nothing;
|
||||
|
||||
CREATE TABLE test_not_found_column_nothing
|
||||
(
|
||||
col001 UInt8,
|
||||
col002 UInt8
|
||||
) Engine=MergeTree ORDER BY tuple() PARTITION BY col001 % 3;
|
||||
|
||||
INSERT INTO test_not_found_column_nothing(col001) SELECT number FROM numbers(11);
|
||||
|
||||
SELECT _part, count() FROM test_not_found_column_nothing PREWHERE col001 % 3 != 0 GROUP BY _part ORDER BY _part;
|
||||
SELECT _part FROM test_not_found_column_nothing PREWHERE col001 = 0;
|
Loading…
Reference in New Issue
Block a user