apache / apache/datafusion-sqlparser-rs
typo in Hive SKEWED BY stringification
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- compilers, databases
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100