From 21880493c57569b81006a84636bc2a60936619c5 Mon Sep 17 00:00:00 2001 From: minghong Date: Fri, 8 Sep 2023 16:25:35 +0800 Subject: [PATCH] [fix](nereids) external scan use STORAGE_ANY instead of ANY as distibution (#24039) --- .../properties/ChildOutputPropertyDeriver.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 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 33df7657fa88fe..e0b3e05a7500d2 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 PhysicalProperties visitPhysicalEmptyRelation(PhysicalEmptyRelation empty @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