mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
mayBeTrueOnGranule
This commit is contained in:
parent
3e02eaf28d
commit
ee3c50e1a0
@ -140,6 +140,9 @@ bool MinMaxCondition::mayBeTrueOnGranule(MergeTreeIndexGranulePtr idx_granule) c
|
||||
if (!granule)
|
||||
throw Exception(
|
||||
"Minmax index condition got a granule with the wrong type.", ErrorCodes::LOGICAL_ERROR);
|
||||
for (const auto & range : granule->parallelogram)
|
||||
if (range.left.isNull() || range.right.isNull())
|
||||
return true;
|
||||
return condition.mayBeTrueInParallelogram(granule->parallelogram, index.data_types);
|
||||
}
|
||||
|
||||
|
@ -9,16 +9,16 @@ CREATE TABLE min_max_with_nullable_string (
|
||||
|
||||
INSERT INTO min_max_with_nullable_string(t) VALUES (now()) (now());
|
||||
|
||||
SELECT count() FROM min_max_with_nullable_string WHERE nullable_str == '.';
|
||||
SELECT count() FROM min_max_with_nullable_string WHERE nullable_str = '.';
|
||||
|
||||
INSERT INTO min_max_with_nullable_string(t, nullable_str) VALUES (now(), '.') (now(), '.');
|
||||
|
||||
SELECT count() FROM min_max_with_nullable_string WHERE nullable_str == '.';
|
||||
SELECT count() FROM min_max_with_nullable_string WHERE nullable_str = '.';
|
||||
|
||||
INSERT INTO min_max_with_nullable_string(t, nullable_str) VALUES (now(), NULL) (now(), '.') (now(), NULL) (now(), '.') (now(), NULL);
|
||||
|
||||
SELECT count() FROM min_max_with_nullable_string WHERE nullable_str == '.';
|
||||
SELECT count() FROM min_max_with_nullable_string WHERE nullable_str = '.';
|
||||
|
||||
SELECT count() FROM min_max_with_nullable_string WHERE nullable_str == '';
|
||||
SELECT count() FROM min_max_with_nullable_string WHERE nullable_str = '';
|
||||
|
||||
DROP TABLE min_max_with_nullable_string;
|
Loading…
Reference in New Issue
Block a user