cetra3 opened a new pull request, #22102: URL: https://github.com/apache/datafusion/pull/22102
## Which issue does this PR close? - Closes https://github.com/apache/datafusion/issues/22073 ## Rationale for this change This partially reverts the changes in PR https://github.com/apache/datafusion/pull/21743 but keeps the cardinality when desugaring to `array_min` and `array_max` values. This aligns more with the outputs from the existing datafusion functions, rather than going down the path of having full on PostgreSQL null semantics. ## What changes are included in this PR? Adjusts how we desugar certain queries such as `> ANY` etc.. rather than using a full chain, we use a simplified version that just checks the cardinality first and combines with `array_min/array_max` operators I.e, ```sql SELECT * FROM t WHERE col > ANY([1, 2, 3]) ``` Desugars to: ```sql cardinality([1, 2, 3]) > 0 AND col > array_min([1, 2, 3]) ``` Which get simplified to: ```sql col > 1 ``` ## Are these changes tested? Yes they are tested ## Are there any user-facing changes? Yes, there are some changes to the output of some queries. However these changes were **not shipped** as part of `53.1.0`, and are only on `main` -- 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]
