-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-30365][table-planner] New dynamic partition pruning strategy to support more dpp patterns #21489
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
Conversation
d15eab2
to
c4a0304
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @swuferhong , I left some comments
.../flink/table/planner/plan/optimize/program/FlinkDynamicPartitionPruningConverterProgram.java
Outdated
Show resolved
Hide resolved
...rc/main/scala/org/apache/flink/table/planner/plan/optimize/program/FlinkChainedProgram.scala
Outdated
Show resolved
Hide resolved
...planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java
Outdated
Show resolved
Hide resolved
...planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java
Outdated
Show resolved
Hide resolved
...planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java
Outdated
Show resolved
Hide resolved
...planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java
Outdated
Show resolved
Hide resolved
...planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java
Outdated
Show resolved
Hide resolved
.../src/main/scala/org/apache/flink/table/planner/plan/optimize/program/FlinkBatchProgram.scala
Outdated
Show resolved
Hide resolved
.../flink/table/planner/plan/optimize/program/FlinkDynamicPartitionPruningConverterProgram.java
Outdated
Show resolved
Hide resolved
.../flink/table/planner/plan/optimize/program/FlinkDynamicPartitionPruningConverterProgram.java
Outdated
Show resolved
Hide resolved
...planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java
Outdated
Show resolved
Hide resolved
...rg/apache/flink/table/planner/plan/optimize/program/FlinkDynamicPartitionPruningProgram.java
Outdated
Show resolved
Hide resolved
...rg/apache/flink/table/planner/plan/optimize/program/FlinkDynamicPartitionPruningProgram.java
Outdated
Show resolved
Hide resolved
...planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java
Outdated
Show resolved
Hide resolved
...planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java
Outdated
Show resolved
Hide resolved
12d5475
to
9656978
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, LGTM
if (tables.size() == 0) { | ||
tables.add(catalogTable); | ||
} else { | ||
for (ContextResolvedTable thisTable : new ArrayList<>(tables)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why we need new ArrayList instance here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why we need new ArrayList instance here?
The list variable tables
have an add
operation in the for loop. If we don't new one new ArrayList, a concurrent modification exception will be thrown.
It's better we can add this optimization in flink-tpcds-test module, we can do it in another pr. |
|
…o support more dpp patterns This closes apache#21489
…o support more dpp patterns This closes apache#21489
What is the purpose of the change
This pr is aims to introduce a new dynamic partition pruning strategy named
FlinkDynamicPartitionPruningConverterProgram
to instead of the old dpp ruleDynamicPartitionPruningRule
to support more dpp patterns. Now, the old dpp rule is tightly coupled with the join reorder rules, which will affect the result of join reorder. At the same time, the dpp rule don't support these patterns likeunion node/ agg node in fact side
、dim side is a sub-query
etc. This pr will fix this two problem together.Brief change log
FlinkDynamicPartitionPruningConverterProgram
to instead of the old dpp ruleDynamicPartitionPruningRule
.FlinkDynamicPartitionPruningConverterProgramTest
.Verifying this change
FlinkDynamicPartitionPruningConverterProgramTest
.Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation