phillipleblanc opened a new pull request, #19321:
URL: https://github.com/apache/datafusion/pull/19321

   ## Which issue does this PR close?
   
   - Closes #19320
   
   ## Rationale for this change
   
   Improves the type inference for placeholder expressions, so PREPARE/EXECUTE 
workflows have better type inference.
   
   ## What changes are included in this PR?
   
   Add support for inferring placeholder types in CASE expressions within 
`Expr::infer_placeholder_types`. This handles both simple CASE (`CASE expr WHEN 
...`) and searched CASE (`CASE WHEN condition ...`) expressions.
   
   For simple CASE:
   - WHEN placeholders infer type from the base expression
   - THEN/ELSE placeholders infer type from the first concrete THEN/ELSE
   
   For searched CASE:
   - WHEN placeholders are typed as Boolean (conditions must be boolean)
   - THEN/ELSE placeholders infer type from the first concrete THEN/ELSE
   
   Also adds `rewrite_placeholder_type` helper for setting placeholder types 
directly when no source expression is available (e.g., Boolean for searched 
CASE WHEN conditions).
   
   ## Are these changes tested?
   
   Yes
   
   ## 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]

Reply via email to