apache / apache/datafusion-sqlparser-rs

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

オープン
#1,415 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
3.5k
フォーク
772
平均マージ
4日 9時間
マージ済み PR(30日)
17

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Issue に示されている既存の parse_statement override から始め、次に parse_table_and_joins と dialect interface を調べて、parser methods がどのようにディスパッチされるかを特定します。override 可能であるべきメソッドの完全な集合を定義し、dialect がこれらの entry points をインターセプトできる場合でも、サポートされている parsing が引き続き機能することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
postgresql, rust, sql
領域
databases
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
32/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。