apache / apache/datafusion-sqlparser-rs

Misleading error message

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

説明

```sql
select
1
from (
select
f(interval '1 hour')
from t
where time > 2023-01-03T00:00:00Z
)
```

which misses the quotes around `2023-01-03T00:00:00Z` gives:

```text
Error during parsing: ParserError("Expected ), found: '1 hour'")
```

but should probably point somewhere at `time > 2023-01-03T00:00:00Z`.

Note that the reproducer requires the outer select query, otherwise we get an actually useful error:

```text
Error during parsing: ParserError("Expected end of statement, found: T00")
```

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

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

調査の方向性

まず SQL の再現手順を実行し、ネストされたクエリの parser エラーを、より単純なクエリで得られる有用なエラーと比較します。ネストされた SELECT と無効な timestamp 比較に対する parser のエントリポイントを追跡します。完了の条件は、より単純な診断を後退させることなく、報告された位置が不足している引用符を特定することです。

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

評価

技術スタック
rust, sql
領域
compilers
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
50/100

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

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