This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new 00ecb29 [Bug] Fix colocate agg error when group of colocate table is unstable (#6559) 00ecb29 is described below commit 00ecb2904b8c6b82b40d39fede0198c7913c5471 Author: EmmyMiao87 <522274...@qq.com> AuthorDate: Sat Sep 4 11:00:12 2021 +0800 [Bug] Fix colocate agg error when group of colocate table is unstable (#6559) If the colocate group of the table is not stable, then even if it is a colocate table, its data distribution is Random. So the distribution info of OlapScanNode is also Random instead of Hash Partition. Fixed #6558 --- fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java index cd0ac63..3423487 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java @@ -30,6 +30,7 @@ import org.apache.doris.analysis.SlotRef; import org.apache.doris.analysis.TupleDescriptor; import org.apache.doris.analysis.TupleId; import org.apache.doris.catalog.Catalog; +import org.apache.doris.catalog.ColocateTableIndex; import org.apache.doris.catalog.Column; import org.apache.doris.catalog.DistributionInfo; import org.apache.doris.catalog.HashDistributionInfo; @@ -903,7 +904,9 @@ public class OlapScanNode extends ScanNode { when data partition of fragment is UNPARTITION. */ public DataPartition constructInputPartitionByDistributionInfo() { - if (Catalog.getCurrentColocateIndex().isColocateTable(olapTable.getId()) + ColocateTableIndex colocateTableIndex = Catalog.getCurrentColocateIndex(); + if ((colocateTableIndex.isColocateTable(olapTable.getId()) + && !colocateTableIndex.isGroupUnstable(colocateTableIndex.getGroup(olapTable.getId()))) || olapTable.getPartitionInfo().getType() == PartitionType.UNPARTITIONED || olapTable.getPartitions().size() == 1) { DistributionInfo distributionInfo = olapTable.getDefaultDistributionInfo(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org