LLDay opened a new pull request, #20169: URL: https://github.com/apache/datafusion/pull/20169
## Rationale for this change Part of #14342. Previously, DataFusion required all placeholders to be resolved to literal values before physical planning. This limitation made it difficult to work in systems where physical plans might be cached or reused, or where resolution happens later in the execution pipeline. By introducing `PlaceholderExpr` at the physical level, we allow the physical planner to handle unresolved placeholders. This is a logical next step for [PR #20009](https://github.com/apache/datafusion/pull/20009) and part of the effort to improve plan reuse support in DataFusion. ## What changes are included in this PR? - Introduced `PlaceholderExpr` as a new physical expression. - Updated the physical planner to support creating `PlaceholderExpr` when encountering `Expr::Placeholder`. - Updated the constant evaluator to correctly handle (skip) placeholders during optimization. ## Are these changes tested? Yes, SLTs have been added, which verifies that placeholders are correctly preserved in physical plans across a wide range of SQL queries. ## Are there any user-facing changes? Yes, users can now generate physical plans for queries containing unresolved placeholders. Attempting to *execute* these plans without resolving the placeholders will still result in an error, but the planning phase no longer requires their resolution. -- 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]
