godfreyhe commented on code in PR #20596:
URL: https://github.com/apache/flink/pull/20596#discussion_r949779080
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java:
##########
@@ -171,7 +171,20 @@ private static void visitFactSide(
joinKeys.stream()
.map(i -> scan.getRowType().getFieldNames().get(i))
.collect(Collectors.toList());
- factSideFactors.isSuitableFactScanSource =
!candidateFields.isEmpty();
+ if (candidateFields.isEmpty()) {
+ factSideFactors.isSuitableFactScanSource = false;
+ return;
+ }
+
+ List<String> suitableFields = new ArrayList<>();
+
+ for (String candidateField : candidateFields) {
Review Comment:
That is not the real reason. The reason is many unexpected query pattern
will be treated as dpp if the candidateFields are not partition keys.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]