apache / apache/datafusion

Improve DataFusion error handling

Aperta
#7,360 1 commento 5 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?

I'm trying to collect known issues related to error handling in datafusion.

So far I can see different categories which can be improved
1. DataFusion heavily relies on Rust `Result` and sometimes its hard to identify context where the actual error is happening, the situation becomes even worse for downstream projects.
- [x] https://github.com/apache/arrow-datafusion/issues/5283
- [x] https://github.com/apache/arrow-datafusion/issues/3410 (this related to upstream arrow-rs)
2. Overuse panics
- [x] https://github.com/apache/arrow-datafusion/issues/3313
- [x] https://github.com/apache/arrow-datafusion/issues/3317
- [ ] https://github.com/apache/arrow-datafusion/issues/3316
3. Overuse internal error type in situations where more specific error kind can be used
- [x] https://github.com/apache/arrow-datafusion/issues/6108
- [x] https://github.com/apache/arrow-datafusion/issues/9164
4. General
- [x] https://github.com/apache/arrow-datafusion/issues/7552

### Describe the solution you'd like

We can try to address some of the issues with implementing a generic error macros that will be used for handling DF errors. Having done that allows to process errors in standard unified way, experiment with stacktraces and other details needed to be exposed for the end user.

- [x] https://github.com/apache/arrow-datafusion/pull/7115
- [x] https://github.com/apache/arrow-datafusion/pull/7293
- [x] https://github.com/apache/arrow-datafusion/pull/7340
- [x] https://github.com/apache/arrow-datafusion/pull/7361
- [x] https://github.com/apache/arrow-datafusion/pull/8586
- [x] SQL Error macros
- [ ] Parquet Error macros
- [ ] ObjectStore Error macros
- [ ] IOError macros
- [x] https://github.com/apache/arrow-datafusion/pull/8620
- [x] https://github.com/apache/datafusion/pull/11374
- [ ] External Error macros
- [ ] Context Error macros
- [x] Substrait Error macros
- [x] https://github.com/apache/arrow-datafusion/pull/7434

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Esamina gli elementi selezionati e non selezionati dell’issue, in particolare le issue collegate e le pull request esistenti, per capire quale lavoro di gestione degli errori resta da completare. Stabilisci un ambito più ristretto prima di iniziare; completato deve significare che una categoria di errori concordata è stata gestita con l’approccio alla macro generica proposto e che il lavoro correlato è completo.

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à
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.