You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Weijun-H (via GitHub)" <gi...@apache.org> on 2023/02/28 09:42:01 UTC

[GitHub] [arrow-rs] Weijun-H commented on a diff in pull request #3763: Implement concat_elements_dyn kernel

Weijun-H commented on code in PR #3763:
URL: https://github.com/apache/arrow-rs/pull/3763#discussion_r1119800287


##########
arrow-string/src/concat_elements.rs:
##########
@@ -156,10 +158,35 @@ pub fn concat_elements_utf8_many<Offset: OffsetSizeTrait>(
     Ok(unsafe { builder.build_unchecked() }.into())
 }
 
+pub fn concat_elements_dyn(
+    left: &dyn Array,
+    right: &dyn Array,
+) -> Result<ArrayRef, ArrowError> {
+    if left.data_type() != right.data_type() {
+        return Err(ArrowError::ComputeError(format!(
+            "Cannot concat arrays of different types: {} != {}",
+            left.data_type(),
+            right.data_type()
+        )));
+    }
+    match (left.data_type(), right.data_type()) {

Review Comment:
   Certainly, you are correct. I plan to address LargeUtf8 at a later time.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org