apache / apache/datafusion-sqlparser-rs
CTE FROM Statement should be of type ObjectName or TableFactor
- Lingua principale
- Rust
- Stelle
- 3.5k
- Fork
- 772
- Merge medio
- 4g 9h
- PR unite (30g)
- 17
Descrizione
First of all, thanks for this awesome package!
While parsing the AST, I came Across Cte's FROM Statement:
https://github.com/sqlparser-rs/sqlparser-rs/blob/6b2b3f1f6c903bddc87ba0858b5ccdb94c5e2242/src/ast/query.rs#L337-L341
This renders as WITH ... AS ... FROM ...
While I am not sure which Database actually supports this syntax, I expected FROM to be an `ObjectName` or `TableFactor`, so basically a `Vec` instead of a single `Ident`.
I am not 100% sure this is actually a bug as I don't know which Database supports this syntax. It feels wrong though for this FROM to behave so differently.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia in src/ast/query.rs, nella definizione di CTE intorno alle righe 337-341, e verifica come il campo FROM è rappresentato nei tipi AST circostanti. Controlla quali dialetti SQL supportano questa forma e confrontala con l’uso di ObjectName e TableFactor altrove. Il lavoro è completato quando la sintassi FROM di CTE prevista ha una rappresentazione AST coerente e validata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- databases
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100