kszucs commented on a change in pull request #8088:
URL: https://github.com/apache/arrow/pull/8088#discussion_r484345700



##########
File path: cpp/src/arrow/util/converter.h
##########
@@ -0,0 +1,281 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "arrow/array.h"
+#include "arrow/builder.h"
+#include "arrow/chunked_array.h"
+#include "arrow/status.h"
+#include "arrow/type.h"
+#include "arrow/type_traits.h"
+#include "arrow/util/checked_cast.h"
+
+#include "arrow/visitor_inline.h"
+
+namespace arrow {
+
+using internal::checked_cast;
+using internal::checked_pointer_cast;
+
+template <typename Input, typename Options>
+class ArrayConverter {
+ public:
+  using InputType = Input;
+  using OptionsType = Options;
+
+  ArrayConverter(const std::shared_ptr<DataType>& type,
+                 std::shared_ptr<ArrayBuilder> builder, Options options)
+      : sp_type_(type), sp_builder_(builder), options_(options) {}
+
+  virtual ~ArrayConverter() = default;
+  const std::shared_ptr<ArrayBuilder>& builder() const { return sp_builder_; }
+  const std::shared_ptr<DataType>& type() const { return sp_type_; }
+  Options options() const { return options_; }
+
+  virtual Status Init() { return Status::OK(); }
+  virtual Status Reserve(int64_t additional_capacity) = 0;
+  virtual Status Append(InputType value) = 0;
+  virtual Status AppendNull() = 0;
+  virtual Status Extend(Input seq, int64_t size) = 0;

Review comment:
       Agreed, removing.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to