Support volatile functions and scalar variables in ListingTable partition pruning
- 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?
Currently `ListingTable` partition prunning doesn't support volatile functions and scalar variables, like `now()` or `$var`, which is checked at https://github.com/apache/datafusion/blob/4b8c1d9d6b4eb7ebb2876abbed911055b4badfad/datafusion/catalog-listing/src/helpers.rs#L51-L118
### Describe the solution you'd like
Volatile functions and scalar variables being supported in `ListingTable` partition pruning
### Describe alternatives you've considered
_No response_
### Additional context
Suggested by @comphead at [#21679](https://www.github.com/apache/datafusion/pull/21679#discussion_r3094909808)
Contributor guide
Research direction
Start with the partition-pruning checks in datafusion/catalog-listing/src/helpers.rs, especially lines 51-118, then trace how ListingTable supplies expressions for pruning. Verify the behavior for volatile functions such as now() and scalar variables such as $var; done means both are supported without preventing correct partition pruning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100