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

Function ConvertDatetime

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

Source from the content-addressed store, hash-verified

1525
1526template <typename T, int64_t SHIFT>
1527inline void ConvertDatetime(const ChunkedArray& data, int64_t* out_values) {
1528 for (int c = 0; c < data.num_chunks(); c++) {
1529 const auto& arr = *data.chunk(c);
1530 const T* in_values = GetPrimitiveValues<T>(arr);
1531
1532 for (int64_t i = 0; i < arr.length(); ++i) {
1533 *out_values++ = arr.IsNull(i) ? kPandasTimestampNull
1534 : (static_cast<int64_t>(in_values[i]) * SHIFT);
1535 }
1536 }
1537}
1538
1539template <typename T, int SHIFT>
1540void 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