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

Function ConvertIntegerWithNulls

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

Source from the content-addressed store, hash-verified

567
568template <typename InType, typename OutType>
569inline void ConvertIntegerWithNulls(const PandasOptions& options,
570 const ChunkedArray& data, OutType* out_values) {
571 for (int c = 0; c < data.num_chunks(); c++) {
572 const auto& arr = *data.chunk(c);
573 const InType* in_values = GetPrimitiveValues<InType>(arr);
574 // Upcast to double, set NaN as appropriate
575
576 for (int i = 0; i < arr.length(); ++i) {
577 *out_values++ =
578 arr.IsNull(i) ? static_cast<OutType>(NAN) : static_cast<OutType>(in_values[i]);
579 }
580 }
581}
582
583template <typename T>
584inline 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