apache / apache/datafusion-sqlparser-rs
IDENTIFIER literal with double quotes inside single quotes is parsed as one token instead of multiple identifiers
- 主要言語
- Rust
- スター
- 3.5k
- フォーク
- 772
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 17
説明
When running the following statement:
CREATE TABLE IDENTIFIER('"ORGDATA"."PUBLIC"."car_sales"')
the parser produces:
SingleQuotedString("\"ORGDATA\".\"PUBLIC\".\"car_sales\"")
It is treated as a single token (a literal string) instead of being parsed into three separate identifiers ("ORGDATA", "PUBLIC", "car_sales").
Since the IDENTIFIER function expects a literal, the content must be re-parsed.
**Suggestions:**
1. Expose a function that can take a SingleQuotedString like: '"ORGDATA"."PUBLIC"."car_sales"' and re-parse it into separate Ident tokens (ORGDATA, PUBLIC, car_sales).
2. change the tokenizer so that when IDENTIFIER is used with a quoted string containing double quotes, the inner content is tokenized as identifiers rather than treated as a raw single string.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、パーサーが CREATE TABLE IDENTIFIER(...) をどのように処理し、SingleQuotedString の値が IDENTIFIER 関数または tokenizer にどのように到達するかを追跡します。例を再現し、意図された結果が3つの引用符付き識別子であるかを判断します。完了条件は、入力が単一のリテラルとして扱われなくなり、既存のパース動作が維持されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100