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

Method AppendArray

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

Source from the content-addressed store, hash-verified

431 /// \brief Append a whole dense array to the builder
432 template <typename T1 = T>
433 enable_if_t<!is_fixed_size_binary_type<T1>::value, Status> AppendArray(
434 const Array& array) {
435 using ArrayType = typename TypeTraits<T>::ArrayType;
436
437#ifndef NDEBUG
438 ARROW_RETURN_NOT_OK(ArrayBuilder::CheckArrayType(
439 value_type_, array, "Wrong value type of array to be appended"));
440#endif
441
442 const auto& concrete_array = static_cast<const ArrayType&>(array);
443 for (int64_t i = 0; i < array.length(); i++) {
444 if (array.IsNull(i)) {
445 ARROW_RETURN_NOT_OK(AppendNull());
446 } else {
447 ARROW_RETURN_NOT_OK(Append(concrete_array.GetView(i)));
448 }
449 }
450 return Status::OK();
451 }
452
453 template <typename T1 = T>
454 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