This is an automated email from the ASF dual-hosted git repository.
starocean999 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new ab85fb3592 [Fix](PhysicalPlanTranslator) forget
setPushDownAggNoGrouping in OlapScanNode (#23675)
ab85fb3592 is described below
commit ab85fb359223264c0c96ed5c593a83638c0d0563
Author: airborne12 <[email protected]>
AuthorDate: Thu Aug 31 11:49:55 2023 +0800
[Fix](PhysicalPlanTranslator) forget setPushDownAggNoGrouping in
OlapScanNode (#23675)
* [Fix](PhysicalPlanTranslator) forget setPushDownAggNoGrouping in
OlapScanNode
* use relation id instead of table id
---
.../doris/nereids/glue/translator/PhysicalPlanTranslator.java | 8 ++++----
.../doris/nereids/glue/translator/PlanTranslatorContext.java | 11 ++++++-----
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java
index e16e851fe3..c8b4a701a3 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java
@@ -91,7 +91,6 @@ import
org.apache.doris.nereids.trees.plans.physical.PhysicalAssertNumRows;
import org.apache.doris.nereids.trees.plans.physical.PhysicalCTEAnchor;
import org.apache.doris.nereids.trees.plans.physical.PhysicalCTEConsumer;
import org.apache.doris.nereids.trees.plans.physical.PhysicalCTEProducer;
-import org.apache.doris.nereids.trees.plans.physical.PhysicalCatalogRelation;
import
org.apache.doris.nereids.trees.plans.physical.PhysicalDeferMaterializeOlapScan;
import
org.apache.doris.nereids.trees.plans.physical.PhysicalDeferMaterializeResultSink;
import
org.apache.doris.nereids.trees.plans.physical.PhysicalDeferMaterializeTopN;
@@ -437,7 +436,7 @@ public class PhysicalPlanTranslator extends
DefaultPlanVisitor<PlanFragment, Pla
}
scanNode.addConjuncts(translateToLegacyConjuncts(fileScan.getConjuncts()));
-
scanNode.setPushDownAggNoGrouping(context.getTablePushAggOp(table.getId()));
+
scanNode.setPushDownAggNoGrouping(context.getRelationPushAggOp(fileScan.getRelationId()));
TableName tableName = new TableName(null, "", "");
TableRef ref = new TableRef(tableName, null, null);
@@ -576,6 +575,7 @@ public class PhysicalPlanTranslator extends
DefaultPlanVisitor<PlanFragment, Pla
expr, olapScanNode, context)
)
);
+
olapScanNode.setPushDownAggNoGrouping(context.getRelationPushAggOp(olapScan.getRelationId()));
// TODO: we need to remove all finalizeForNereids
olapScanNode.finalizeForNereids();
// Create PlanFragment
@@ -817,8 +817,8 @@ public class PhysicalPlanTranslator extends
DefaultPlanVisitor<PlanFragment, Pla
+ storageLayerAggregate.getAggOp());
}
- context.setTablePushAggOp(
- ((PhysicalCatalogRelation)
storageLayerAggregate.getRelation()).getTable().getId(), pushAggOp);
+ context.setRelationPushAggOp(
+ storageLayerAggregate.getRelation().getRelationId(),
pushAggOp);
PlanFragment planFragment =
storageLayerAggregate.getRelation().accept(this, context);
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PlanTranslatorContext.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PlanTranslatorContext.java
index 4e90d3eea2..4136def701 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PlanTranslatorContext.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PlanTranslatorContext.java
@@ -32,6 +32,7 @@ import org.apache.doris.nereids.trees.expressions.CTEId;
import org.apache.doris.nereids.trees.expressions.ExprId;
import org.apache.doris.nereids.trees.expressions.SlotReference;
import org.apache.doris.nereids.trees.expressions.VirtualSlotReference;
+import org.apache.doris.nereids.trees.plans.RelationId;
import org.apache.doris.nereids.trees.plans.physical.PhysicalCTEConsumer;
import org.apache.doris.nereids.trees.plans.physical.PhysicalCTEProducer;
import org.apache.doris.nereids.trees.plans.physical.PhysicalHashAggregate;
@@ -94,7 +95,7 @@ public class PlanTranslatorContext {
private final Map<PlanFragmentId, CTEScanNode> cteScanNodeMap =
Maps.newHashMap();
- private final Map<Long, TPushAggOp> tablePushAggOp = Maps.newHashMap();
+ private final Map<RelationId, TPushAggOp> tablePushAggOp =
Maps.newHashMap();
public PlanTranslatorContext(CascadesContext ctx) {
this.translator = new
RuntimeFilterTranslator(ctx.getRuntimeFilterContext());
@@ -239,11 +240,11 @@ public class PlanTranslatorContext {
return descTable;
}
- public void setTablePushAggOp(Long tableId, TPushAggOp aggOp) {
- tablePushAggOp.put(tableId, aggOp);
+ public void setRelationPushAggOp(RelationId relationId, TPushAggOp aggOp) {
+ tablePushAggOp.put(relationId, aggOp);
}
- public TPushAggOp getTablePushAggOp(Long tableId) {
- return tablePushAggOp.getOrDefault(tableId, TPushAggOp.NONE);
+ public TPushAggOp getRelationPushAggOp(RelationId relationId) {
+ return tablePushAggOp.getOrDefault(relationId, TPushAggOp.NONE);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]