apache / apache/datafusion-sqlparser-rs
stop the use of `dialect_of` and referring to specific dialects in parser
- Lingua principale
- Rust
- Stelle
- 3.5k
- Fork
- 772
- Merge medio
- 4g 9h
- PR unite (30g)
- 17
Descrizione
TL;DR; — I want to stop `Parser` from referring to specific dialects, and instead consult the dialect about specific behaviour.
In particular, use of `dialect_of` and custom dialect behaviour in `Parser` should be removed
Abstract reasons to do this:
* it's very esoteric in Rust, I've never seen another library use this approach, It's like reading (bad) python, in Rust
* it's poor separation of concerns — the Parser should concentrate on parsing SQL, and defer to the dialect about how to behave in some scenarios, rather than holding information about how mysql differs from Snowflake etc.
Concrete reasons to do this:
* I want to use "from first" syntax (#1400) with otherwise postgres syntax — currently dialects can't opt into certain behaviour because the parser is checking for a specific dialect, not for a given behaviour
I've already discussed this with @alamb, I'll try to do this in multiple PRs, to make it easier to review.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia tracciando gli utilizzi di dialect_of da parte di Parser e il suo comportamento con i dialetti personalizzati. Confronta questi percorsi con il comportamento necessario per la sintassi “from first” di issue #1400; il lavoro è completato quando Parser non fa più riferimento a dialetti specifici, ma consulta il dialetto per prendere queste decisioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust, sql
- Ambito
- compilers, databases
- Tipo di issue
- Refactoring
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100