swuferhong commented on code in PR #21489: URL: https://github.com/apache/flink/pull/21489#discussion_r1063265717
########## flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java: ########## @@ -137,6 +140,20 @@ private static RelNode convertDppFactSide( || !(tableSource instanceof ScanTableSource)) { return rel; } + + // Dpp cannot success if source support aggregate push down, source aggregate push + // down enabled is true and aggregate push down success. + if (tableSource instanceof SupportsAggregatePushDown + && ShortcutUtils.unwrapContext(rel) + .getTableConfig() + .get( + OptimizerConfigOptions + .TABLE_OPTIMIZER_SOURCE_AGGREGATE_PUSHDOWN_ENABLED) + && Arrays.stream(tableSourceTable.abilitySpecs()) Review Comment: > just need check `Arrays.stream(tableSourceTable.abilitySpecs()).anyMatch(spec -> spec instanceof AggregatePushDownSpec)` Done! -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org