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

Function ConvertIntegerWithNulls

python/pyarrow/src/arrow/python/arrow_to_pandas.cc:580–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578
579template <typename InType, typename OutType>
580inline void ConvertIntegerWithNulls(const PandasOptions& options,
581 const ChunkedArray& data, OutType* out_values) {
582 for (int c = 0; c < data.num_chunks(); c++) {
583 const auto& arr = *data.chunk(c);
584 const InType* in_values = GetPrimitiveValues<InType>(arr);
585 // Upcast to double, set NaN as appropriate
586
587 for (int i = 0; i < arr.length(); ++i) {
588 *out_values++ =
589 arr.IsNull(i) ? static_cast<OutType>(NAN) : static_cast<OutType>(in_values[i]);
590 }
591 }
592}
593
594template <typename T>
595inline void ConvertIntegerNoNullsSameType(const PandasOptions& options,

Callers

nothing calls this directly

Calls 3

num_chunksMethod · 0.45
lengthMethod · 0.45
IsNullMethod · 0.45

Tested by

no test coverage detected