MCPcopy Create free account
hub / github.com/apache/arrow / AppendArray

Method AppendArray

cpp/src/arrow/array/builder_dict.h:422–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420 /// \brief Append a whole dense array to the builder
421 template <typename T1 = T>
422 enable_if_t<!is_fixed_size_binary_type<T1>::value, Status> AppendArray(
423 const Array& array) {
424 using ArrayType = typename TypeTraits<T>::ArrayType;
425
426#ifndef NDEBUG
427 ARROW_RETURN_NOT_OK(ArrayBuilder::CheckArrayType(
428 value_type_, array, "Wrong value type of array to be appended"));
429#endif
430
431 const auto& concrete_array = static_cast<const ArrayType&>(array);
432 for (int64_t i = 0; i < array.length(); i++) {
433 if (array.IsNull(i)) {
434 ARROW_RETURN_NOT_OK(AppendNull());
435 } else {
436 ARROW_RETURN_NOT_OK(Append(concrete_array.GetView(i)));
437 }
438 }
439 return Status::OK();
440 }
441
442 template <typename T1 = T>
443 enable_if_fixed_size_binary<T1, Status> AppendArray(const Array& array) {

Callers 6

TYPED_TESTFunction · 0.45
TESTFunction · 0.45
GenerateInputDataMethod · 0.45
AsDictionary32EncodedFunction · 0.45

Calls 7

AppendNullFunction · 0.70
AppendFunction · 0.70
OKFunction · 0.50
lengthMethod · 0.45
IsNullMethod · 0.45
GetViewMethod · 0.45
GetValueMethod · 0.45

Tested by 4

TYPED_TESTFunction · 0.36
TESTFunction · 0.36
GenerateInputDataMethod · 0.36
AsDictionary32EncodedFunction · 0.36