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 not quite the same as `zip`. More like a specialised version of
`merge_n` that takes two arrays and the indices can only by `0` or `1`.
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`.
--
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]