Dandandan opened a new pull request, #21964: URL: https://github.com/apache/datafusion/pull/21964
## Which issue does this PR close? - Closes #. ## Rationale for this change Some optimizer paths were returning `Transformed::yes` even when they preserved the original plan or expression. That can cause unnecessary follow-up optimizer work and makes the transformed flag less useful as a fixed-point signal. ## What changes are included in this PR? - Reports `Transformed::no` when filter pushdown through joins, aggregates, windows, or table scans does not actually change the plan. - Reports `Transformed::no` when constant simplification preserves an expression after a runtime simplification error. - Tracks whether placeholder type inference actually fills in placeholder type information before reporting a transformation. - Preserves `Transformed::no` in `AggregateStatistics` recursive child optimization when the optimized child is the same plan handle. ## Are these changes tested? Existing and targeted tests: ```bash cargo fmt --all cargo test --locked -p datafusion-optimizer filter_with_table_provider cargo test --locked -p datafusion-optimizer test_simplify_divide_zero_by_zero cargo test --locked -p datafusion-expr placeholder cargo test --locked -p datafusion aggregate_statistics --test core_integration cargo check --locked -p datafusion-expr -p datafusion-optimizer -p datafusion-physical-optimizer cargo clippy --locked -p datafusion-expr -p datafusion-optimizer -p datafusion-physical-optimizer --all-targets --message-format=short -- -D warnings cargo clippy --locked --workspace --exclude datafusion-benchmarks --all-targets --all-features -- -D warnings git diff --check ``` Also attempted: ```bash cargo clippy --all-targets --all-features -- -D warnings ``` That command fails in `datafusion-benchmarks` because `--all-features` enables both `snmalloc` and `mimalloc`, which the benchmark binaries explicitly reject. ## Are there any user-facing changes? No. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
