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

Method CanZeroCopy

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

Source from the content-addressed store, hash-verified

1604 using TypedPandasWriter<NPY_DATETIME>::TypedPandasWriter;
1605
1606 bool CanZeroCopy(const ChunkedArray& data) const override {
1607 if (data.type()->id() == Type::TIMESTAMP) {
1608 const auto& type = checked_cast<const TimestampType&>(*data.type());
1609 return IsNonNullContiguous(data) && type.unit() == UNIT;
1610 } else {
1611 return false;
1612 }
1613 }
1614
1615 Status CopyInto(std::shared_ptr<ChunkedArray> data, int64_t rel_placement) override {
1616 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