apache / apache/datafusion-sqlparser-rs
Increase testing & SQL support
- 主要言語
- Rust
- スター
- 3.5k
- フォーク
- 772
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 17
説明
I want to write down some ideas about increasing support for commonly used SQL statement.
Some different ideas for doing more testing:
1. Add SQL corpora that should be parsed correctly. I think we can create a directory with multiple dialects with multiple corpora.
Examples can be TPCDS benchmark http://www.tpc.org/tpcds/ and other resources from different projects.
We can test two main things here:
- Whether everything parses to a statement
- When serialized (e.g. to JSON), whether it outputs the same thing as a earlier version of slqparser.
2. Increasing test coverage by adding unit tests
3. Increasing test coverage (not only when measuring coverage by line) by adding property-based tests https://github.com/BurntSushi/quickcheck https://github.com/AltSysrq/proptest
3. Add debug asserts, to make sure any assumptions about the inputs are correct. Because those are enabled during testing, they can be very helpful in general to make sure those really hold.
4. Fuzzing https://github.com/andygrove/sqlparser-rs/pull/211 . This can help with finding any edge cases in the parser which crashes without much effort.
Some great list of general testing strategies can be found here:
https://www.sqlite.org/testing.html
Any feedback, ideas on this?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
この issue は、SQL コーパス、単体テストとプロパティベーステスト、デバッグアサーション、ファジングを対象とする広範な提案であり、具体的なファイルやテストは指定されていません。まず、parser の現在のテストエントリポイントと PR #211 のファジング作業を確認してください。完了とするには、提案を、parsing、シリアライズ、またはファジングについて明示的な成果が得られる具体的なテスト変更に絞り込む必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust, sql
- 領域
- databases, testing-qa
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100