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

Method Write

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

Source from the content-addressed store, hash-verified

421 virtual bool CanZeroCopy(const ChunkedArray& data) const { return false; }
422
423 virtual Status Write(std::shared_ptr<ChunkedArray> data, int64_t abs_placement,
424 int64_t rel_placement) {
425 RETURN_NOT_OK(EnsurePlacementAllocated());
426 if (num_columns_ == 1 && options_.allow_zero_copy_blocks) {
427 RETURN_NOT_OK(TransferSingle(data, /*py_ref=*/nullptr));
428 } else {
429 RETURN_NOT_OK(
430 CheckNoZeroCopy("Cannot do zero copy conversion into "
431 "multi-column DataFrame block"));
432 RETURN_NOT_OK(EnsureAllocated());
433 RETURN_NOT_OK(CopyInto(data, rel_placement));
434 }
435 placement_data_[rel_placement] = abs_placement;
436 return Status::OK();
437 }
438
439 virtual Status GetDataFrameResult(PyObject** out) {
440 PyObject* result = PyDict_New();

Callers 2

WriteTableToBlocksMethod · 0.45
ConvertMethod · 0.45

Calls 1

OKFunction · 0.50

Tested by

no test coverage detected