Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](nereids) external scan use STORAGE_ANY instead of ANY as distibution #24039

Merged
merged 2 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,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.conjuncts = ImmutableSet.copyOf(Objects.requireNonNull(conjuncts, "conjuncts should not be null"));
this(id, table, qualifier, groupExpression, logicalProperties,
null, null, conjuncts);
}

/**
Expand Down