This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit b6a085a6c2deaf19db92e97da891d32169fbdc1c Author: minghong <engle...@gmail.com> AuthorDate: Fri Sep 8 16:25:35 2023 +0800 [fix](nereids) external scan use STORAGE_ANY instead of ANY as distibution (#24039) --- .../nereids/properties/ChildOutputPropertyDeriver.java | 16 +++++++++++++--- .../nereids/trees/plans/physical/PhysicalJdbcScan.java | 5 ++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java index 33df7657fa..e0b3e05a75 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java @@ -125,17 +125,27 @@ public class ChildOutputPropertyDeriver extends PlanVisitor<PhysicalProperties, @Override public PhysicalProperties visitPhysicalEsScan(PhysicalEsScan esScan, PlanContext context) { - return PhysicalProperties.ANY; + return PhysicalProperties.STORAGE_ANY; } @Override public PhysicalProperties visitPhysicalFileScan(PhysicalFileScan fileScan, PlanContext context) { - return PhysicalProperties.ANY; + return PhysicalProperties.STORAGE_ANY; } + /** + * TODO return ANY after refactor coordinator + * return STORAGE_ANY not ANY, in order to generate distribute on jdbc scan. + * select * from (select * from external.T) as A union all (select * from external.T) + * if visitPhysicalJdbcScan returns ANY, the plan is + * union + * |--- JDBCSCAN + * +--- JDBCSCAN + * this breaks coordinator assumption that one fragment has at most only one scan. + */ @Override public PhysicalProperties visitPhysicalJdbcScan(PhysicalJdbcScan jdbcScan, PlanContext context) { - return PhysicalProperties.ANY; + return PhysicalProperties.STORAGE_ANY; } @Override diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalJdbcScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalJdbcScan.java index a91dba2ee5..c1753beccb 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalJdbcScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalJdbcScan.java @@ -49,9 +49,8 @@ public class PhysicalJdbcScan extends PhysicalCatalogRelation { */ public PhysicalJdbcScan(RelationId id, TableIf table, List<String> qualifier, Optional<GroupExpression> groupExpression, LogicalProperties logicalProperties, Set<Expression> conjuncts) { - super(id, PlanType.PHYSICAL_JDBC_SCAN, table, qualifier, groupExpression, logicalProperties); - this.table = table; - this.conjuncts = ImmutableSet.copyOf(Objects.requireNonNull(conjuncts, "conjuncts should not be null")); + this(id, table, qualifier, groupExpression, logicalProperties, + null, null, conjuncts); } /** --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org