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

Function Append

cpp/src/arrow/array/builder_union.h:156–165  ·  view source on GitHub ↗

\brief Append an element to the UnionArray. This must be followed by an append to the appropriate child builder. \param[in] next_type type_id of the child to which the next value will be appended. The corresponding child builder must be appended to independently after this method is called.

Source from the content-addressed store, hash-verified

154 /// The corresponding child builder must be appended to independently after this method
155 /// is called.
156 Status Append(int8_t next_type) {
157 ARROW_RETURN_NOT_OK(types_builder_.Append(next_type));
158 if (type_id_to_children_[next_type]->length() == kListMaximumElements) {
159 return Status::CapacityError(
160 "a dense UnionArray cannot contain more than 2^31 - 1 elements from a single "
161 "child");
162 }
163 auto offset = static_cast<int32_t>(type_id_to_children_[next_type]->length());
164 return offsets_builder_.Append(offset);
165 }
166
167 Status AppendArraySlice(const ArraySpan& array, int64_t offset,
168 int64_t length) override;

Callers 6

AppendMethod · 0.70
AppendArrayMethod · 0.70
AppendArraySliceImplMethod · 0.70
AppendScalarImplMethod · 0.70
AppendArraySliceMethod · 0.70
AppendMethod · 0.50

Calls 3

CapacityErrorFunction · 0.85
AppendMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected