apache / apache/datafusion-sqlparser-rs

typo in Hive SKEWED BY stringification

未关闭
#1,499 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
3.5k
派生
772
平均合并
4 天 9 小时
30 天内合并 PR
17

描述

I haven't run this code and it seems the SKEWED BY syntax can't even be parsed, but I've been looking at all the possible values of ast::Statement and this looks suspicious:

https://github.com/apache/datafusion-sqlparser-rs/blob/e2197eeca9ef2d51a26f29ac23c15515aa668a0f/src/ast/dml.rs#L271

```rust

write!(
f,
" SKEWED BY ({})) ON ({})",
display_comma_separated(columns),
display_comma_separated(on)
)?;
```

SKEWED BY has one open and two closing parens.

贡献指南

这个仓库没有索引到贡献指南

调研方向

Inspect src/ast/dml.rs around line 271, then run the parser and stringification path for a Hive SKEWED BY statement to reproduce the malformed parentheses. Done means the statement parses successfully and its stringified SQL has balanced parentheses; verify the behavior with any relevant existing tests you find.

由索引模型根据 Issue 内容生成。

评估

技术栈
rust, sql
领域
compilers, databases
Issue 类型
缺陷
难度
1/5
预计耗时
1 小时以内
活跃度
停滞
描述清晰度
描述清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。