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

Function ConvertDatesShift

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

Source from the content-addressed store, hash-verified

1538
1539template <typename T, int SHIFT>
1540void ConvertDatesShift(const ChunkedArray& data, int64_t* out_values) {
1541 for (int c = 0; c < data.num_chunks(); c++) {
1542 const auto& arr = *data.chunk(c);
1543 const T* in_values = GetPrimitiveValues<T>(arr);
1544 for (int64_t i = 0; i < arr.length(); ++i) {
1545 *out_values++ = arr.IsNull(i) ? kPandasTimestampNull
1546 : static_cast<int64_t>(in_values[i]) / SHIFT;
1547 }
1548 }
1549}
1550
1551class DatetimeDayWriter : public TypedPandasWriter<NPY_DATETIME> {
1552 public:

Callers

nothing calls this directly

Calls 3

num_chunksMethod · 0.45
lengthMethod · 0.45
IsNullMethod · 0.45

Tested by

no test coverage detected