apache / apache/datafusion

Normalize the order of binary expression

Open
#4,688 1 comment 1 reaction 0 assignees View on GitHub
enhancement
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? Please describe what you are trying to do.**

Make the order of binary expression unified. For example

`3 > a` -> `a < 3`

It will make simplify expr rule more simple.

----

As for join binary expression

A join B on B.key = A.key
->
A join B on A.key = B.key

**Describe the solution you'd like**
Add a rule to do it.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Research direction

Start by locating DataFusion's existing expression simplification rules and review how binary comparisons and join predicates are represented. Add coverage for the two normalization examples; done means equivalent expressions use a consistent operand order.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.