ump45nose opened a new pull request, #2757: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2757
Dialects: MySQL, SQLite, Generic, PostgreSQL, DuckDB ## Summary `DELETE ... LIMIT n` was accepted by every dialect, including `GenericDialect`. Engines that use Generic (e.g. DataFusion) therefore parsed the LIMIT and then silently ignored it. ## Fix - Add `Dialect::supports_delete_limit()` (default `false`) - Enable for MySQL and SQLite (real engine support) - Parse `LIMIT` in `DELETE` only when the dialect opts in Closes #2615. Docs: - https://dev.mysql.com/doc/refman/8.4/en/delete.html - https://www.sqlite.org/lang_delete.html ## Test plan - `cargo test --all-features` - `cargo fmt --all` - `cargo clippy --all-targets --all-features -- -D warnings` - New: `parse_delete_limit_dialect_gated` (positive for supporting dialects, reject others) - Existing MySQL/SQLite DELETE LIMIT tests still pass - Fuzz seed: `fuzz/fuzz_seeds/mysql_2615_delete_limit.sql` ## AI assistance This change was developed with AI assistance (Cursor / Grok Bot). I reviewed every line of the diff and the test output before opening this PR. -- 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]
