apache / apache/datafusion-sqlparser-rs

typo in Hive SKEWED BY stringification

Offen
#1,499 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
3.5k
Forks
772
Ø Merge
4 T. 9 Std.
Gemergte PRs (30 T.)
17

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust, sql
Bereich
compilers, databases
Issue-Typ
Bug
Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.