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

Function AppendCellRange

cpp/src/arrow/stl.h:149–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147/// it can be specialized by users.
148template <typename ValueCType, typename ListBuilderType, typename Range>
149Status AppendCellRange(ListBuilderType& builder, Range&& cell_range) {
150 constexpr bool is_list_builder = std::is_same<ListBuilderType, ListBuilder>::value;
151 constexpr bool is_large_list_builder =
152 std::is_same<ListBuilderType, LargeListBuilder>::value;
153 static_assert(
154 is_list_builder || is_large_list_builder,
155 "Builder type must be either ListBuilder or LargeListBuilder for appending "
156 "multiple rows.");
157
158 using ChildBuilderType = CBuilderType<ValueCType>;
159 ARROW_RETURN_NOT_OK(builder.Append());
160 auto& value_builder =
161 ::arrow::internal::checked_cast<ChildBuilderType&>(*builder.value_builder());
162
163 // XXX: Remove appended value before returning if status isn't OK?
164 return AppendListValues<ValueCType>(value_builder, std::forward<Range>(cell_range));
165}
166
167template <typename ValueCType>
168struct ConversionTraits<std::vector<ValueCType>>

Callers

nothing calls this directly

Calls 2

AppendMethod · 0.45
value_builderMethod · 0.45

Tested by

no test coverage detected