kosiew opened a new pull request, #18691: URL: https://github.com/apache/datafusion/pull/18691
## Which issue does this PR close? * Closes #17716. ## Rationale for this change The `FETCH NEXT` clause was being parsed without triggering an error, resulting in the CLI executing queries containing unsupported SQL syntax. This could mislead users into believing the feature is supported and undermine SQL correctness guarantees. Adding explicit handling ensures unsupported syntax fails fast with a clear and consistent error message. ## What changes are included in this PR? * Added explicit detection of the `FETCH` clause in `SqlToRel` and return a `not_impl_err!` when encountered. * Updated CLI integration tests to include a snapshot verifying that the CLI now returns an error when `FETCH` is used. * Added a SQL integration test confirming that the planner correctly rejects `FETCH`. * Updated user documentation to note that DataFusion does not currently support the SQL `FETCH` clause. ## Are these changes tested? Yes. The PR includes: * A new CLI integration test snapshot validating the error message. * A new SQL integration test (`fetch_clause_is_not_supported`) verifying planner behavior. ## Are there any user-facing changes? Yes. Queries using the SQL `FETCH` clause will now produce a clear error instead of executing unexpectedly. Documentation has been updated to reflect this behavior. ## LLM-generated code disclosure This pull request includes code that was generated with assistance from LLM. All LLM-generated code in this PR has been manually reviewed and tested. -- 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]
