Skip to content

Commit

Permalink
[fix](nereids) external scan use STORAGE_ANY instead of ANY as distib…
Browse files Browse the repository at this point in the history
…ution (apache#24039)
  • Loading branch information
englefly authored and morningman committed Sep 13, 2023
1 parent 13c3081 commit 2188049
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2188049

Please sign in to comment.