apache / apache/datafusion

Support `abs` func in PruningPredicate for static pruning

Open
#4,388 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

I think we can support rewrite `abs(i) = 1` to `i = 1 or i = -1`🤔 further.

_Originally posted by @Ted-Jiang in https://github.com/apache/arrow-datafusion/pull/4387#discussion_r1032896021_

Contributor guide

Open the contributing guide

Research direction

Start by locating PruningPredicate and the static-pruning rewrite logic in the DataFusion source; no specific file or test is named in the issue. Trace how equality predicates are rewritten, then add coverage showing that abs(i) = 1 becomes i = 1 or i = -1 and verify the pruning behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases, performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.