| 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 |
nothing calls this directly
no test coverage detected