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

Method Extend

python/pyarrow/src/arrow/python/python_to_arrow.cc:557–565  ·  view source on GitHub ↗

Iterate over the input values and defer the conversion to the Append method

Source from the content-addressed store, hash-verified

555 public:
556 // Iterate over the input values and defer the conversion to the Append method
557 Status Extend(PyObject* values, int64_t size, int64_t offset = 0) override {
558 ARROW_DCHECK_GE(size, offset);
559 /// Ensure we've allocated enough space
560 RETURN_NOT_OK(this->Reserve(size - offset));
561 // Iterate over the items adding each one
562 return internal::VisitSequence(
563 values, offset,
564 [this](PyObject* item, bool* /* unused */) { return this->Append(item); });
565 }
566
567 // Convert and append a sequence of values masked with a numpy array
568 Status ExtendMasked(PyObject* values, PyObject* mask, int64_t size,

Callers 3

AppendSequenceMethod · 0.45
AppendNdarrayMethod · 0.45
ConvertPySequenceFunction · 0.45

Calls 3

VisitSequenceFunction · 0.85
ReserveMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected