edubraqd opened a new pull request, #24938: URL: https://github.com/apache/datafusion/pull/24938
## Which issue does this PR close? - Closes #24937. ## Rationale for this change `ScalarValue::partial_cmp` for lists compared the elements with the `lt` / `eq` kernels, which reject nested element types, so `min` / `max` over a list of lists or a list of structs failed with `Internal error: Uncomparable values`. ## What changes are included in this PR? `partial_cmp_list` now compares the elements with `arrow::array::make_comparator`, which supports the nested types. `nulls_first: false` keeps the existing Postgres semantics where a NULL element is greater than a non-NULL one (this replaces the hand-written null checks), and the prefix / length rule is unchanged. ## Are these changes tested? Yes. `test_nested_list_partial_cmp` covers lists of lists (equal, less, greater, shorter prefix at both levels) and lists of structs; the existing `test_list_partial_cmp` and the rest of the `scalar` tests pass unchanged. `aggregate.slt` gains `min` / `max` over a list of lists and a list of structs. ## Are there any user-facing changes? `min` / `max` (and other list scalar comparisons) work for lists of nested values instead of returning an internal error. -- 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]
