You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2022/11/08 08:04:26 UTC

[arrow] branch master updated: ARROW-18212: [C++] NumericBuilder::Reset() doesn't reset all members (#14559)

This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 5889c78e34 ARROW-18212: [C++] NumericBuilder::Reset() doesn't reset all members (#14559)
5889c78e34 is described below

commit 5889c78e344688f8fa8100ecdf254cd701ee3445
Author: Jin Shang <sh...@gmail.com>
AuthorDate: Tue Nov 8 16:04:18 2022 +0800

    ARROW-18212: [C++] NumericBuilder::Reset() doesn't reset all members (#14559)
    
    Authored-by: Jin Shang <sh...@gmail.com>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 cpp/src/arrow/array/builder_primitive.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cpp/src/arrow/array/builder_primitive.h b/cpp/src/arrow/array/builder_primitive.h
index 8f2dcc8b09..83a876021e 100644
--- a/cpp/src/arrow/array/builder_primitive.h
+++ b/cpp/src/arrow/array/builder_primitive.h
@@ -131,7 +131,10 @@ class NumericBuilder : public ArrayBuilder {
 
   value_type GetValue(int64_t index) const { return data_builder_.data()[index]; }
 
-  void Reset() override { data_builder_.Reset(); }
+  void Reset() override {
+    data_builder_.Reset();
+    ArrayBuilder::Reset();
+  }
 
   Status Resize(int64_t capacity) override {
     ARROW_RETURN_NOT_OK(CheckCapacity(capacity));