tustvold commented on code in PR #1720:
URL: https://github.com/apache/arrow-rs/pull/1720#discussion_r879218896


##########
arrow/src/compute/kernels/concat.rs:
##########
@@ -102,6 +102,72 @@ pub fn concat(arrays: &[&dyn Array]) -> Result<ArrayRef> {
     Ok(make_array(mutable.freeze()))
 }
 
+// Elementwise concatenation of StringArrays
+pub fn string_concat<Offset: OffsetSizeTrait>(
+    left: &GenericStringArray<Offset>,
+    right: &GenericStringArray<Offset>,
+) -> Result<GenericStringArray<Offset>> {
+    // TODO: Handle non-zero offset in source ArrayData
+
+    if left.len() != right.len() {
+        return Err(ArrowError::ComputeError(
+            "StringArrays must have the same length".to_string(),
+        ));
+    }
+
+    let output_bitmap = match (left.data().null_bitmap(), 
right.data().null_bitmap()) {

Review Comment:
   Using combine_option_bitmap as suggested by @tfeda is probably a good idea - 
this currently won't handle offsets.



-- 
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]

Reply via email to