apache / apache/datafusion-sqlparser-rs
Unable to parse 'max' for optional precision column with MS Sql dialect
- 主要语言
- Rust
- 星标
- 3.5k
- 派生
- 772
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 17
描述
The following is a valid MS Sql query, but cannot ne parsed due to the `varbinary` implementation.
Variable character-based columns, `nvarchar` and `varchar`, use a union type `CharacterLength` type that allows for either `IntegerLength` or `Max` values. The `varbinary` implementation needs a similar union, such as `BinaryLength` (reusing `CharacterLength` seems to have a naming mismatch).
```
#[test]
fn parse_ms_sql_varbinary_max(){
let sql = "CREATE TABLE example(VarBinaryMaxCol varbinary(max) not null);";
let parsed = ms().parse_sql_statements(sql);
assert!(parsed.is_ok());
}
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 varbinary 实现开始,并将其与 issue 中描述的 CharacterLength 处理进行比较。运行提供的 parse_ms_sql_varbinary_max 测试;完成的标准是包含 varbinary(max) 的 MS SQL CREATE TABLE 语句能够成功解析。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 55/100