You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "js8544 (via GitHub)" <gi...@apache.org> on 2023/05/20 03:52:13 UTC

[GitHub] [arrow] js8544 commented on a diff in pull request #35613: GH-35611: [C++] Remove unnecessary safe operations for ListBuilder and BinaryBuilder

js8544 commented on code in PR #35613:
URL: https://github.com/apache/arrow/pull/35613#discussion_r1199549613


##########
cpp/src/arrow/array/builder_nested.h:
##########
@@ -202,6 +201,11 @@ class BaseListBuilder : public ArrayBuilder {
     const int64_t num_values = value_builder_->length();
     return offsets_builder_.Append(static_cast<offset_type>(num_values));
   }
+
+  void UnsafeAppendNextOffset() {

Review Comment:
   I'm not sure. In `AppendNulls` and `AppendEmptyValues` the same offset is appended multiple times. Currently this number is only computed once. If we use `UnsafeAppendNextOffset` there, the line `const int64_t num_values = value_builder_->length();` will be computed multiple times.
   



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