lidavidm commented on code in PR #33641:
URL: https://github.com/apache/arrow/pull/33641#discussion_r1109077870


##########
cpp/src/arrow/array/concatenate.cc:
##########
@@ -436,6 +438,28 @@ class ConcatenateImpl {
     return Status::OK();
   }
 
+  Status Visit(const RunEndEncodedType& type) {
+    int64_t physical_length = 0;
+    for (const auto& input : in_) {
+      if (internal::AddWithOverflow(physical_length,
+                                    
ree_util::FindPhysicalLength(ArraySpan(*input)),
+                                    &physical_length) ||
+          // Make sure we can safely downcast to int32_t

Review Comment:
   And in any case, shouldn't we do the right check for int16_t? What if you 
concatenate two int16_t arrays with a single run of length 65535?



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