apache / apache/datafusion

Move WHERE expression to join conversion to optimization rule

Aperta
#3,840 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Rust
Stelle
9.3k
Fork
2.4k
Merge medio
3g 11h
PR unite (30g)
360

Descrizione

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
During optimization, we generate `filter` expressions that might benefit from being optimized to joins.

Currently, where filters like these `where left_column = right_column` are converted to joins in the SQL planner (in the function `plan_selection`).
We should have a rule that does the same thing and let it replace the conversion in the planner.

**Describe the solution you'd like**
Implement the where expression to join conversion in an optimization rule instead, so it can also be used after filters have been added to the plan and try to convert them to joins as well.

**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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by tracing the SQL planner's plan_selection function, where WHERE filters are currently converted to joins. Identify the existing conversion logic and the optimization-rule interfaces around it. Done means the conversion is performed by an optimization rule, replaces the planner conversion, and also handles filters added later in planning.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust, sql
Ambito
databases
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.