apache / apache/datafusion-sqlparser-rs
Allow to override all the `parser..` methods.
- Lingua principale
- Rust
- Stelle
- 3.5k
- Fork
- 772
- Merge medio
- 4g 9h
- PR unite (30g)
- 17
Descrizione
We are building a new RDBMS that still has only partial support for the full `SQL` dialect of Postgres.
This means that we need to parse the strings, and then rule out everything we still do not support. It will be easier and probably faster if we can do:
```rust
// As is possible here
pub fn parse_statement(&mut self) -> Result {
let _guard = self.recursion_counter.try_decrease()?;
// allow the dialect to override statement parsing
if let Some(statement) = self.dialect.parse_statement(self) {
return statement;
}
....
}
// Make at least the major components overridable:
pub fn parse_table_and_joins(&mut self) -> Result {
if let Some(result) = self.dialect.parse_table_and_joins(self) {
return result;
}
...
...
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con l’override parse_statement esistente mostrato nell’issue, quindi esamina parse_table_and_joins e la dialect interface per identificare come vengono eseguiti i parser methods. Definisci l’insieme completo dei metodi che dovrebbero poter essere sottoposti a override e verifica che il parsing supportato continui a funzionare mentre un dialect può intercettare questi entry points.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- postgresql, rust, sql
- Ambito
- databases
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 32/100