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

Method AppendValue

cpp/src/arrow/json/from_string.cc:604–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602 }
603
604 Status AppendValue(sj::value& json_obj) override {
605 ARROW_ASSIGN_OR_RAISE(bool is_null, internal::IsJsonNull(json_obj));
606 if (is_null) {
607 return this->AppendNull();
608 }
609 ARROW_ASSIGN_OR_RAISE(auto array, internal::GetJsonAs<sj::array>(json_obj));
610 size_t num_elements;
611 if (array.count_elements().get(num_elements) != simdjson::SUCCESS) {
612 return Status::Invalid("Malformed JSON array for type ", this->type_->ToString());
613 }
614 // Extend the child converter with this JSON array
615 ARROW_RETURN_NOT_OK(builder_->Append(true, static_cast<int64_t>(num_elements)));
616 return child_converter_->AppendValues(array).status();
617 }
618
619 std::shared_ptr<ArrayBuilder> builder() override { return builder_; }
620

Callers

nothing calls this directly

Calls 7

InvalidFunction · 0.50
AppendNullMethod · 0.45
getMethod · 0.45
ToStringMethod · 0.45
AppendMethod · 0.45
statusMethod · 0.45
AppendValuesMethod · 0.45

Tested by

no test coverage detected