You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/10 12:44:16 UTC

[GitHub] [arrow-rs] HaoYang670 commented on a diff in pull request #2034: Refine the List builder

HaoYang670 commented on code in PR #2034:
URL: https://github.com/apache/arrow-rs/pull/2034#discussion_r917390798


##########
arrow/src/array/builder/generic_list_builder.rs:
##########
@@ -136,7 +131,7 @@ where
 
         let offset_buffer = self.offsets_builder.finish();
         let null_bit_buffer = self.bitmap_builder.finish();
-        self.offsets_builder.append(self.len);
+        self.offsets_builder.append(OffsetSize::zero());

Review Comment:
   Append a leading zero to the offset buffer, so that the buffer could be reused.
   I don't change this behaviour. 
   Originally, we had
   ```rust
   self.offsets_builder.append(self.len)
   ```
   where `self.len` is zero.



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