apache / apache/datafusion-sqlparser-rs

Allow to override all the `parser..` methods.

Open
#1,415 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.5k
Forks
772
Avg merge
4d 9h
Merged PRs (30d)
17

Description

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;
}
...
...
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the existing parse_statement override shown in the issue, then inspect parse_table_and_joins and the dialect interface to identify how parser methods are dispatched. Define the complete set of methods that should be overridable and verify that supported parsing still works while a dialect can intercept those entry points.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, rust, sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.