Aitozi commented on code in PR #22001: URL: https://github.com/apache/flink/pull/22001#discussion_r1120009253
########## flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/optimize/program/FlinkBatchProgram.scala: ########## @@ -292,6 +293,16 @@ object FlinkBatchProgram { // convert dynamic partition pruning scan source chainedProgram.addLast(DYNAMIC_PARTITION_PRUNING, new FlinkDynamicPartitionPruningProgram) + // physical rewrite Review Comment: @weng1424 thanks for your review. It's a good idea. I rechecked the related physical rewrite optimization program in `FlinkBatchProgram`. I think it should also execute in `HEP_RULES_EXECUTION_TYPE.RULE_COLLECTION` not `RULE_SEQUENCE`. In this way, we can remove the extra physical rewrite program. After I applied this change, the `PushLocalHashAggIntoScanRule` still did not work as expected because it matched the Exchange -> LocalHashAggregate -> Scan pattern. To make the `PushLocalHashAggIntoScanRule` work as expected, we should also modify the match logic. I will open another ticket to track this -- 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