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

Method CanZeroCopy

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

Source from the content-addressed store, hash-verified

1580 using TypedPandasWriter<NPY_DATETIME>::TypedPandasWriter;
1581
1582 bool CanZeroCopy(const ChunkedArray& data) const override {
1583 if (data.type()->id() == Type::TIMESTAMP) {
1584 const auto& type = checked_cast<const TimestampType&>(*data.type());
1585 return IsNonNullContiguous(data) && type.unit() == UNIT;
1586 } else {
1587 return false;
1588 }
1589 }
1590
1591 Status CopyInto(std::shared_ptr<ChunkedArray> data, int64_t rel_placement) override {
1592 const auto& ts_type = checked_cast<const TimestampType&>(*data->type());

Callers

nothing calls this directly

Calls 4

IsNonNullContiguousFunction · 0.85
idMethod · 0.45
typeMethod · 0.45
unitMethod · 0.45

Tested by

no test coverage detected