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

Method Write

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

Source from the content-addressed store, hash-verified

432 virtual bool CanZeroCopy(const ChunkedArray& data) const { return false; }
433
434 virtual Status Write(std::shared_ptr<ChunkedArray> data, int64_t abs_placement,
435 int64_t rel_placement) {
436 RETURN_NOT_OK(EnsurePlacementAllocated());
437 if (num_columns_ == 1 && options_.allow_zero_copy_blocks) {
438 RETURN_NOT_OK(TransferSingle(data, /*py_ref=*/nullptr));
439 } else {
440 RETURN_NOT_OK(
441 CheckNoZeroCopy("Cannot do zero copy conversion into "
442 "multi-column DataFrame block"));
443 RETURN_NOT_OK(EnsureAllocated());
444 RETURN_NOT_OK(CopyInto(data, rel_placement));
445 }
446 placement_data_[rel_placement] = abs_placement;
447 return Status::OK();
448 }
449
450 virtual Status GetDataFrameResult(PyObject** out) {
451 PyObject* result = PyDict_New();

Callers 2

WriteTableToBlocksMethod · 0.45
ConvertMethod · 0.45

Calls 1

OKFunction · 0.50

Tested by

no test coverage detected