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

Function ConvertDatetime

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

Source from the content-addressed store, hash-verified

1549
1550template <typename T, int64_t SHIFT>
1551inline void ConvertDatetime(const ChunkedArray& data, int64_t* out_values) {
1552 for (int c = 0; c < data.num_chunks(); c++) {
1553 const auto& arr = *data.chunk(c);
1554 const T* in_values = GetPrimitiveValues<T>(arr);
1555
1556 for (int64_t i = 0; i < arr.length(); ++i) {
1557 *out_values++ = arr.IsNull(i) ? kPandasTimestampNull
1558 : (static_cast<int64_t>(in_values[i]) * SHIFT);
1559 }
1560 }
1561}
1562
1563template <typename T, int SHIFT>
1564void ConvertDatesShift(const ChunkedArray& data, int64_t* out_values) {

Callers

nothing calls this directly

Calls 3

num_chunksMethod · 0.45
lengthMethod · 0.45
IsNullMethod · 0.45

Tested by

no test coverage detected