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

Function ConvertDatesShift

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

Source from the content-addressed store, hash-verified

1562
1563template <typename T, int SHIFT>
1564void ConvertDatesShift(const ChunkedArray& data, int64_t* out_values) {
1565 for (int c = 0; c < data.num_chunks(); c++) {
1566 const auto& arr = *data.chunk(c);
1567 const T* in_values = GetPrimitiveValues<T>(arr);
1568 for (int64_t i = 0; i < arr.length(); ++i) {
1569 *out_values++ = arr.IsNull(i) ? kPandasTimestampNull
1570 : static_cast<int64_t>(in_values[i]) / SHIFT;
1571 }
1572 }
1573}
1574
1575class DatetimeDayWriter : public TypedPandasWriter<NPY_DATETIME> {
1576 public:

Callers

nothing calls this directly

Calls 3

num_chunksMethod · 0.45
lengthMethod · 0.45
IsNullMethod · 0.45

Tested by

no test coverage detected