apache / apache/datafusion-sqlparser-rs
Create test pattern for Spans
- 主要言語
- Rust
- スター
- 3.5k
- フォーク
- 772
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 17
説明
Part of https://github.com/apache/datafusion-sqlparser-rs/issues/1548
# Usecase
- We have added span information in https://github.com/apache/datafusion-sqlparser-rs/pull/1435
We would like to add span information through out the rest of the AST structures (see docs in https://github.com/apache/datafusion-sqlparser-rs/pull/1549) and list on https://github.com/apache/datafusion-sqlparser-rs/issues/1548
In order to support this feature reasonably, we need to be able to test the feature and avoid regressions
# Proposal
I think we need some sort of span test.
I recommend
1. A new test binary like `tests/sqlparser_spans.rs`
Then add a test that
1. Parses a SQL string
2. Check the spans of the AST nodes match what is expected
I think we'll have to use judgement on how fine grained the location information
can / should be.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
issues 1548 と 1563、および PRs 1435 と 1549 のコンテキストを読み、既存の span 情報と計画されている AST カバレッジを理解してください。まず、提案されているテストのエントリポイント tests/sqlparser_spans.rs から始めます。代表的な SQL 文字列をパースし、AST ノードの span と期待される位置を比較してください。テストによって span の動作がカバーされ、リグレッションを検出できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- compilers, testing
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100