pepijnve commented on code in PR #18444:
URL: https://github.com/apache/datafusion/pull/18444#discussion_r2488083734
##########
datafusion/physical-expr/src/expressions/case.rs:
##########
@@ -290,6 +293,84 @@ fn filter_array(
filter.filter(array)
}
+fn merge(
Review Comment:
It's almost the same as `zip`, but different enough that it's necessary.
Without this implementation you can't avoid the scatter step.
I've added a test case to show the difference. The short version is that
`merge([true, false, true], [A, C], [B])` will get you `[A, B, C]` while `zip`
would return an error stating `all arrays should have the same length`.
I agree that these two merge kernels would be better off in `arrow-rs` which
is why I made PR https://github.com/apache/arrow-rs/pull/8753.
--
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]