This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch opt_perf in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/opt_perf by this push: new 29cf8d290b [Opt] distinct key is part of table hash key (#12926) 29cf8d290b is described below commit 29cf8d290b9bde078772e5d86bf6a7ff048fde82 Author: HappenLee <happen...@hotmail.com> AuthorDate: Fri Sep 23 18:33:54 2022 +0800 [Opt] distinct key is part of table hash key (#12926) --- .../main/java/org/apache/doris/planner/DistributedPlanner.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java b/fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java index e9623a1fb1..b1f24eecab 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java +++ b/fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java @@ -643,7 +643,8 @@ public class DistributedPlanner { } SlotRef leftSlot = lhsJoinExpr.unwrapSlotRef(); - if (leftSlot.getTable() instanceof OlapTable) { + if (leftSlot.getTable() instanceof OlapTable + && leftScanNode.desc.getSlots().contains(leftSlot.getDesc())) { // table name in SlotRef is not the really name. `select * from test as t` // table name in SlotRef is `t`, but here we need is `test`. leftJoinColumnNames.add(leftSlot.getTable().getName() + "." + leftSlot.getColumnName()); @@ -1099,12 +1100,12 @@ public class DistributedPlanner { } PlanFragment mergeFragment = null; - boolean childHasCompatPartition = false; // analyzer..equivSets(partitionExprs, - // childFragment.getDataPartition().getPartitionExprs()); - if (childHasCompatPartition) { + if (!hasGrouping && canColocateAgg(firstPhaseAggInfo, + childFragment.getDataPartition())) { // The data is already partitioned on the required expressions, we can skip the // phase 1 merge step. childFragment.addPlanRoot(node); + childFragment.setHasColocatePlanNode(true); mergeFragment = childFragment; } else { DataPartition mergePartition = partitionExprs == null --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org