[EPIC] Support ANSI mode
- Vorherrschende Sprache
- Rust
- Sterne
- 9.3k
- Forks
- 2.4k
- Ø Merge
- 3 T. 11 Std.
- Gemergte PRs (30 T.)
- 360
Beschreibung
### 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_
Beitragsleitfaden
Rechercherichtung
Das Issue nennt keine Dateien oder Tests. Beginne damit, den in PR #18635 eingeführten Session-Parameter zu überprüfen, und ermittle die von ungültigen Casts, Überläufen, Division durch null und fehlerhaften Eingaben betroffenen Ausdrucks- und Funktionsbereiche. Als abgeschlossen gilt die Arbeit, wenn ein konfigurierbares Verhalten auf Session-Ebene, konsistente Fehler bei Aktivierung und das unveränderte nachsichtige Verhalten bei Deaktivierung gewährleistet sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust, sql
- Bereich
- databases
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 28/100