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

Method Fill

cpp/src/arrow/stl.h:405–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403template <typename Range, typename Tuple, std::size_t N = std::tuple_size<Tuple>::value>
404struct TupleSetter {
405 static void Fill(const Table& table, Range* rows) {
406 using std::get;
407 using Element = typename std::tuple_element<N - 1, Tuple>::type;
408 using ArrayType =
409 typename TypeTraits<typename ConversionTraits<Element>::ArrowType>::ArrayType;
410
411 auto iter = rows->begin();
412 const ChunkedArray& chunked_array = *table.column(N - 1);
413 for (int i = 0; i < chunked_array.num_chunks(); i++) {
414 const ArrayType& array =
415 ::arrow::internal::checked_cast<const ArrayType&>(*chunked_array.chunk(i));
416 for (int64_t j = 0; j < array.length(); j++) {
417 get<N - 1>(*iter++) = ConversionTraits<Element>::GetEntry(array, j);
418 }
419 }
420
421 return TupleSetter<Range, Tuple, N - 1>::Fill(table, rows);
422 }
423};
424
425template <typename Range, typename Tuple>

Callers

nothing calls this directly

Calls 4

beginMethod · 0.45
columnMethod · 0.45
num_chunksMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected