gruuya opened a new pull request, #7981: URL: https://github.com/apache/arrow-datafusion/pull/7981
## Which issue does this PR close? Closes #7827. ## Rationale for this change While in principle the output of `DISTINCT ON` can be emulated by combining several aggregation, projection and sorting queries/operators, in practice this is very verbose and impractical for users, unlike `DISTINCT ON` which is quite succinct. On the other hand that does mean that `DISTINCT ON` can be optimized into the equivalent representation under the hood during logical planning, while at the same time providing the compact syntactical interface. ## What changes are included in this PR? - A new logical plan sub-variety for handling the `DISTINCT ON` from Postgres. - Parsing and planning for it - Optimization which converts it into the equivalent representation using the more common logical plan primitives - Proto serialization - Tests ## Are these changes tested? Yes, there are also new SLTs. ## Are there any user-facing changes? SQL support extends to encompass `DISTINCT ON` queries. -- 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]
