vegarsti commented on code in PR #17891:
URL: https://github.com/apache/datafusion/pull/17891#discussion_r2399997629
##########
datafusion/functions-aggregate-common/src/merge_arrays.rs:
##########
@@ -119,17 +119,25 @@ pub fn merge_ordered_arrays(
// Defines according to which ordering comparisons should be done.
sort_options: &[SortOptions],
) -> datafusion_common::Result<(Vec<ScalarValue>, Vec<Vec<ScalarValue>>)> {
- // Keep track the most recent data of each branch, in binary heap data
structure.
+ // Keep track of the most recent data of each branch, in a binary heap
data structure.
let mut heap = BinaryHeap::<CustomElement>::new();
- if values.len() != ordering_values.len()
- || values
- .iter()
- .zip(ordering_values.iter())
- .any(|(vals, ordering_vals)| vals.len() != ordering_vals.len())
+ if values.len() != ordering_values.len() {
Review Comment:
I don't exactly feel strongly about these changes, but since these two
conditions are different I liked the error message telling me which was the
case.
--
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]