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

Method Append

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

Source from the content-addressed store, hash-verified

1007class PyStructConverter : public StructConverter<PyConverter, PyConverterTrait> {
1008 public:
1009 Status Append(PyObject* value) override {
1010 if (PyValue::IsNull(this->options_, value)) {
1011 return this->struct_builder_->AppendNull();
1012 } else if (arrow::py::is_scalar(value)) {
1013 ARROW_ASSIGN_OR_RAISE(std::shared_ptr<Scalar> scalar,
1014 arrow::py::unwrap_scalar(value));
1015 return this->struct_builder_->AppendScalar(GetStorageScalar(*scalar));
1016 }
1017 switch (input_kind_) {
1018 case InputKind::DICT:
1019 RETURN_NOT_OK(AppendDict(value));
1020 return this->struct_builder_->Append();
1021 case InputKind::TUPLE:
1022 RETURN_NOT_OK(AppendTuple(value));
1023 return this->struct_builder_->Append();
1024 case InputKind::ITEMS:
1025 RETURN_NOT_OK(AppendItems(value));
1026 return this->struct_builder_->Append();
1027 default:
1028 RETURN_NOT_OK(InferInputKind(value));
1029 return Append(value);
1030 }
1031 }
1032
1033 protected:
1034 Status Init(MemoryPool* pool) override {

Callers

nothing calls this directly

Calls 7

is_scalarFunction · 0.85
IsNullFunction · 0.50
ARROW_ASSIGN_OR_RAISEFunction · 0.50
AppendFunction · 0.50
AppendNullMethod · 0.45
AppendScalarMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected