apache / apache/datafusion-sqlparser-rs

typo in Hive SKEWED BY stringification

Aperta
#1,499 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
3.5k
Fork
772
Merge medio
4g 9h
PR unite (30g)
17

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust, sql
Ambito
compilers, databases
Tipo di issue
Bug
Difficoltà
1/5
Tempo stimato
Meno di un'ora
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.