phillipleblanc opened a new pull request, #10625: URL: https://github.com/apache/datafusion/pull/10625
## Which issue does this PR close? Closes #10624 Closes #. ## Rationale for this change When unparsing LogicalPlans back to SQL statements for the MySQL dialect, any plan that includes a `Sort` node will produce a SQL statement that looks like: ``` SELECT "ta"."j1_id" FROM "j1" AS "ta" ORDER BY "ta"."j1_id" ASC NULLS LAST LIMIT 10 ^--------^ ``` The `NULLS LAST` causes issues when run against a MySQL server, as it doesn't recognize that syntax. ## What changes are included in this PR? Adds a new function to the Unparser Dialect called `supports_nulls_first_in_sort` which is default `true`, but set to `false` for the MySQL dialect. And in the relevant unparsing code, we set the AST node to None. ## Are these changes tested? Yes, added a new test to cover dialect-specific behavior. ## Are there any user-facing changes? No breaking changes. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org