[EPIC] Support ANSI mode
- 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?
## Description
Apache DataFusion currently follows permissive SQL semantics for many runtime errors (for example, invalid casts, arithmetic overflow, division by zero, and malformed input). To improve SQL compatibility and make behavior configurable, DataFusion should support an ANSI SQL evaluation mode.
ANSI mode would cause operations that encounter invalid input or runtime errors to return an error instead of silently producing `NULL` or another permissive result. This behavior is expected by users migrating from systems that support ANSI SQL semantics (such as Spark SQL with ANSI mode enabled) and enables stricter correctness guarantees.
Supporting ANSI mode should provide:
* A configurable session-level ANSI mode.
* Consistent error semantics across expressions and built-in functions.
* Preservation of existing permissive behavior when ANSI mode is disabled.
This issue tracks adding the infrastructure and expression/function changes required to support ANSI mode throughout DataFusion.
The initial effort started with adding DataFusion parameter https://github.com/apache/datafusion/pull/18635 which is false by default
```
pub enable_ansi_mode: bool, default = false
```
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
La issue non indica file né test. Inizia esaminando il parametro di sessione introdotto in PR #18635 e mappa le aree delle espressioni e delle funzioni interessate da cast non validi, overflow, divisione per zero e input malformato. Il lavoro è completo quando sono disponibili un comportamento configurabile a livello di sessione, errori coerenti quando è abilitato e il comportamento permissivo invariato quando è disabilitato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust, sql
- Ambito
- databases
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 28/100