You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "colinmarc (via GitHub)" <gi...@apache.org> on 2026/10/20 14:32:57 UTC

Re: [I] Support named placeholders wherever numeric ones are allowed [datafusion]

colinmarc commented on issue #11021:
URL: https://github.com/apache/datafusion/issues/11021#issuecomment-6293325676

   I'm not sure if this is the right issue, but we would also like to use named placeholders in `SELECT`. 
   
   There's a fixme for this in the source:
   
   https://github.com/apache/datafusion/blob/500744d5c25499055e3b2ca46b022bc425989203/datafusion/sql/src/expr/value.rs#L141-L143
   
   Our ideal workflow would be something like:
   
    - Use `PlannerContext::new().with_prepare_param_data_types(ts)` to pass (named!) parameter types into `SqlToRel`
    - Much later, bind values to the plan using `with_param_values(ParamValues::Map(...)`
   
   That doesn't work, because the planner always uses positional placeholders. That means we have to use `ParamValues::List` and get the order exactly right, which is brittle. 


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org