apache / apache/datafusion-sqlparser-rs
Create test pattern for Spans
- 主要语言
- Rust
- 星标
- 3.5k
- 派生
- 772
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 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