Jaden-Varkey commented on PR #2969: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2969#issuecomment-6907481683
Thanks. I applied the suggestions from both reviews in 61d34f8 and 72996fe. The first-item cases needed one more change. Generic and Postgres support empty projections, so `peek_empty_projection` read `SELECT offset FROM t` as an empty select list followed by an OFFSET clause. It now calls `peek_select_item_end(1)` for `LIMIT`/`OFFSET`. `SELECT LIMIT 1` and `SELECT OFFSET 1` still parse as empty projections. To check it, I parsed every keyword in 27 select-list positions on 13 dialects, on `main` and on this branch. 94 statements that failed now parse, all with `LIMIT`/`OFFSET` as a column. Two parse differently, both on Generic: `SELECT a, LIMIT ORDER BY 1` and `SELECT a, LIMIT GROUP BY 1` used to parse as a `LIMIT ... BY` clause and now read `limit` as a column. Nothing else changed and nothing panicked. On 61d34f8 I also ran `fuzz_parse_roundtrip` for 10 minutes and `fuzz_parse_sql` for 5 (16 workers each). `fuzz_parse_sql` found nothing. `fuzz_parse_roundtrip` found 8 inputs, all of which fail on `main` too (Postgres `COMMENT ON ... IS` string quoting and MSSQL bracket identifiers), so they're unrelated to this PR. I can open a separate issue for them. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
