Implement statistics support for Substrait
- 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?
A report from Twitter https://twitter.com/mim_djo/status/1740542585410814393
Says:
> a new release of #datafusion 34, still reading #Deltatable via arrow is suboptimal compared to reading Parquet Directly :( something to do with passing stats to get correct join orders.

I think the issue is that https://github.com/apache/arrow-datafusion/issues/7949 and https://github.com/apache/arrow-datafusion/issues/7950 rely on statistics to pick non bad join orders for TPCH queries.
These statistics are not available from the delta provider it seems.
@andygrove says
> RelCommon (common to all operators in Substrait) can contain a hint that has stats
```
message Stats {
double row_count = 1;
double record_size = 2;
substrait.extensions.AdvancedExtension advanced_extension = 10;
}
```
### Describe the solution you'd like
I would like the Datafusion substrait consumer/producer to handle translating
### Describe alternatives you've considered
_No response_
### Additional context
This was brought up by @Dandandan on the ASF slack: https://the-asf.slack.com/archives/C04RJ0C85UZ/p1703885214702039
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia tracciando il consumer e il producer di DataFusion Substrait, quindi leggi le definizioni di Substrait RelCommon e Stats descritte nell'issue. Confronta come vengono rappresentate le statistiche del Delta provider e determina quale traduzione è necessaria affinché la selezione dell'ordine dei join possa utilizzarle; il lavoro è completo quando entrambi i lati gestiscono le statistiche in modo coerente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100