pepijnve commented on code in PR #18444:
URL: https://github.com/apache/datafusion/pull/18444#discussion_r2488104999
##########
datafusion/physical-expr/src/expressions/case.rs:
##########
@@ -290,6 +293,84 @@ fn filter_array(
filter.filter(array)
}
+fn merge(
Review Comment:
@rluvaton's work on zip only covers the case of two scalar inputs BTW.
That's why I chose to delegate to plain zip in that case. array/array,
scalar/array and array/scalar still needs the specific logic here.
The subtle difference between this and zip is in
```
let falsy_length = start - filled;
let falsy_end = falsy_offset + falsy_length;
mutable.extend(1, falsy_offset, falsy_end);
falsy_offset = falsy_end;
```
vs
```
mutable.extend(1, filled, start);
```
where zip is using the slice indices from the mask directly, merge only uses
the length of the slices and tracks the amount taken from truthy and falsy
separately.
--
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]