rok commented on code in PR #47418:
URL: https://github.com/apache/arrow/pull/47418#discussion_r2853728041


##########
cpp/src/arrow/util/byte_size.cc:
##########
@@ -192,6 +192,29 @@ struct GetByteRangesArray {
 
   Status Visit(const LargeBinaryType& type) const { return 
VisitBaseBinary(type); }
 
+  template <typename BaseViewType>
+  Status VisitBaseViewType(const BaseViewType& type) const {
+    using c_type = typename BaseViewType::c_type;
+    RETURN_NOT_OK(VisitBitmap(input.buffers[0]));
+    const Buffer& views = *input.buffers[1];
+    
RETURN_NOT_OK(range_starts->Append(reinterpret_cast<uint64_t>(views.data())));
+    RETURN_NOT_OK(range_offsets->Append(sizeof(c_type) * offset));
+    RETURN_NOT_OK(range_lengths->Append(sizeof(c_type) * length));
+
+    for (std::size_t i = 2; i < input.buffers.size(); i++) {

Review Comment:
   Also perhaps:
   
   ```suggestion
       for (int i = 2; i < input.buffers.size(); i++) {
   ```



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