apache / datafusion-sqlparser-rs

Extensible SQL Lexer and Parser for Rust
Apache License 2.0
2.8k stars 543 forks source link

recursive select calls are parsed with bad trailing_commas parameter #1521

Open tomershaniii opened 1 week ago

tomershaniii commented 1 week ago

The parse_projection function modifies the parsers 'options' flag, this creates different behavior when nesting select calls i.e. select(select()) which can manifest in failure to parse (see unit test)

tomershaniii commented 5 days ago

Thanks for the review @iffyio, changes committed per your suggestions

tomershaniii commented 1 day ago

With tests fixed. @iffyio