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

Method AppendArray

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

Source from the content-addressed store, hash-verified

412 /// \brief Append a whole dense array to the builder
413 template <typename T1 = T>
414 enable_if_t<!is_fixed_size_binary_type<T1>::value, Status> AppendArray(
415 const Array& array) {
416 using ArrayType = typename TypeTraits<T>::ArrayType;
417
418#ifndef NDEBUG
419 ARROW_RETURN_NOT_OK(ArrayBuilder::CheckArrayType(
420 value_type_, array, "Wrong value type of array to be appended"));
421#endif
422
423 const auto& concrete_array = static_cast<const ArrayType&>(array);
424 for (int64_t i = 0; i < array.length(); i++) {
425 if (array.IsNull(i)) {
426 ARROW_RETURN_NOT_OK(AppendNull());
427 } else {
428 ARROW_RETURN_NOT_OK(Append(concrete_array.GetView(i)));
429 }
430 }
431 return Status::OK();
432 }
433
434 template <typename T1 = T>
435 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