mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Merge pull request #49873 from amosbird/fix_49839
Fix a bug with projections and the aggregate_functions_null_for_empty setting (for query_plan_optimize_projection)
This commit is contained in:
commit
512b27ef27
@ -42,6 +42,10 @@ bool canUseProjectionForReadingStep(ReadFromMergeTree * reading)
|
||||
if (reading->getContext()->getSettingsRef().allow_experimental_query_deduplication)
|
||||
return false;
|
||||
|
||||
// Currently projection don't support settings which implicitly modify aggregate functions.
|
||||
if (reading->getContext()->getSettingsRef().aggregate_functions_null_for_empty)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
1554690688
|
@ -0,0 +1,8 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
CREATE TABLE t1 (c0 Int32, PRIMARY KEY (c0)) ENGINE=MergeTree;
|
||||
INSERT INTO t1 VALUES (1554690688);
|
||||
|
||||
SELECT MIN(t1.c0) FROM t1 SETTINGS aggregate_functions_null_for_empty = 1;
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
Loading…
Reference in New Issue
Block a user