Arkur745 commented on code in PR #47522:
URL: https://github.com/apache/arrow/pull/47522#discussion_r2329782050


##########
cpp/src/arrow/array/builder_nested.h:
##########
@@ -780,6 +787,19 @@ class ARROW_EXPORT StructBuilder : public ArrayBuilder {
     return Append(false);
   }
 
+  /// This method is "unsafe" because it does not check for capacity.
+  /// The caller is responsible for calling Reserve() beforehand to ensure
+  /// there is enough space. This method will append nulls to all child
+  /// builders to maintain a consistent state.
+  Status UnsafeAppendNull(){
+    null_bitmap_builder_.UnsafeAppend(false);
+    for(const auto& child: children_){
+      ARROW_RETURN_NOT_OK(child->AppendNull());
+    }
+    length_++;

Review Comment:
   I’ve committed the changes you suggested (API updates, usage of 
[UnsafeAppend(is_valid)] and am currently working on resolving lint issues. 
I’ve also synced my branch with the latest main and am running a clean build 
and test cycle. I’ll update again once all CI checks pass.



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