mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 20:32:43 +00:00
Fix projection match
This commit is contained in:
parent
9bdd9c912e
commit
cd302eacc1
@ -4122,7 +4122,8 @@ bool MergeTreeData::getQueryProcessingStageWithAggregateProjection(
|
|||||||
candidate.before_aggregation = analysis_result.before_aggregation->clone();
|
candidate.before_aggregation = analysis_result.before_aggregation->clone();
|
||||||
auto required_columns = candidate.before_aggregation->foldActionsByProjection(keys, projection.sample_block_for_keys);
|
auto required_columns = candidate.before_aggregation->foldActionsByProjection(keys, projection.sample_block_for_keys);
|
||||||
|
|
||||||
if (required_columns.empty() && !keys.empty())
|
// TODO Let's find out the exact required_columns for keys.
|
||||||
|
if (required_columns.empty() && (!keys.empty() && !candidate.before_aggregation->getRequiredColumns().empty()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (analysis_result.optimize_aggregation_in_order)
|
if (analysis_result.optimize_aggregation_in_order)
|
||||||
|
Loading…
Reference in New Issue
Block a user