apache / apache/datafusion

Provide a way to enable source level statistics for tables registered in the CLI

Aperta
#3,774 2 commenti 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.**
#1347 enabled collection of statistics by default on the `ListingOptions` constructor, though the tables created with `CREATE EXTERNAL TABLE` can't still use this feature since they are created manually.
https://github.com/apache/arrow-datafusion/blob/e54110fb592e03704da5f6ebd832b8fe1c51123b/datafusion/core/src/execution/context.rs#L486-L488

**Describe the solution you'd like**
We already have a per file extension listing option implementation for the `read_` dataframe APIs (e.g. `CsvReadOptions`, `ParquetReadOptions`) and they have sane defaults (like `collect_stats` is `false` for CSV and `true` for Parquet). I wonder whether we can just use them here and obtain the `ListingOptions` directly from them.

**Describe alternatives you've considered**
Leaving as is, or enabling them globally (instead of refactoring that part to use `ReadOptions`) by just setting the flag to true.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Parti dalla costruzione di ListingOptions in datafusion/core/src/execution/context.rs nelle vicinanze delle righe collegate, quindi confrontala con le implementazioni esistenti di CsvReadOptions e ParquetReadOptions. Determina come le tabelle esterne create dalla CLI possano ottenere opzioni di listing specifiche per formato, con il completamento indicato da statistiche a livello di origine secondo i valori predefiniti collect_stats stabiliti dai formati.

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

Valutazione

Stack tecnologico
rust, sql
Ambito
cli, databases
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 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.