Support named placeholders wherever numeric ones are allowed
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Is your feature request related to a problem or challenge?
The work done in https://github.com/apache/datafusion/issues/8245 moved this forward. I'd like to request/suggest expanding it to cover the two cases explicitly ruled out by the original work.
It makes just as much sense when inserting/updating/deleting to use named placeholders as it does in select.
We and our customers are commonly writing inserts that have 5, 10+ numeric placeholders and it is harder to work with/keep track of and have lead to several typo/bugs that named placeholders would have made less likely, if not ruled out altogether.
### Describe the solution you'd like
Add the ability to use named placeholders - from what I can see the handling of `insert_into_plan` can be made to be the same as it was in the PR be replacing the current impl https://github.com/apache/datafusion/blob/main/datafusion/sql/src/statement.rs#L1428 with usage of https://github.com/Asura7969/arrow-datafusion/blob/6480020e695ebbe2b81e8971c3ee0e9e7ec124b0/datafusion/common/src/param_value.rs#L68
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start with datafusion/sql/src/statement.rs at insert_into_plan around line 1428, and review the parameter handling from the work in issue 8245. Compare it with datafusion/common/src/param_value.rs around line 68. Done means named placeholders are accepted in insert, update, and delete wherever numeric placeholders are currently allowed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100