do not push down agg on aggregate column (#27356)

do not push down agg on aggregate column
This commit is contained in:
Pxl
2023-11-22 10:53:29 +08:00
committed by GitHub
parent b821672f8b
commit b541de7a03
8 changed files with 17 additions and 13 deletions

View File

@ -436,11 +436,8 @@ public class AggregateStrategies implements ImplementationRuleFactory {
for (SlotReference slot : usedSlotInTable) {
Column column = slot.getColumn().get();
if (logicalScan instanceof LogicalOlapScan) {
KeysType keysType = ((LogicalOlapScan) logicalScan).getTable().getKeysType();
if (keysType == KeysType.AGG_KEYS && !column.isKey()) {
return canNotPush;
}
if (column.isAggregated()) {
return canNotPush;
}
// The zone map max length of CharFamily is 512, do not
// over the length: https://github.com/apache/doris/pull/6293

View File

@ -1668,6 +1668,13 @@ public class OlapScanNode extends ScanNode {
return false;
}
if (aggExpr.getChild(0) instanceof SlotRef) {
SlotRef slot = (SlotRef) aggExpr.getChild(0);
if (CreateMaterializedViewStmt.isMVColumn(slot.getColumnName()) && slot.getColumn().isAggregated()) {
return false;
}
}
return true;
}
}