alamb commented on code in PR #2142:
URL: https://github.com/apache/arrow-datafusion/pull/2142#discussion_r842638299
##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -484,6 +485,24 @@ fn bitwise_or(left: ArrayRef, right: ArrayRef) ->
Result<ArrayRef> {
}
}
+/// Use datafusion build-in expression `concat` to evaluate `StringConcat`
operator
+fn string_concat(left: ArrayRef, right: ArrayRef) -> Result<ArrayRef> {
+ // return NULL if left or right is NULL
+ for i in 0..left.len() {
+ if left.is_null(i) || right.is_null(i) {
+ return Ok(new_null_array(&DataType::Utf8, left.len()));
+ }
+ }
Review Comment:
This doesn't look quite right:
1. It will return NULL for *all* rows if any of the inputs is null (rather
than just the rows for which it is null)
2. It will always return `DataType::Utf8` even when the input was
`DataType::LargeUtf8`
--
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]