| 489 | } |
| 490 | |
| 491 | Status AppendValue(sj::value& json_obj) override { |
| 492 | ARROW_ASSIGN_OR_RAISE(bool is_null, internal::IsJsonNull(json_obj)); |
| 493 | if (is_null) { |
| 494 | return this->AppendNull(); |
| 495 | } |
| 496 | |
| 497 | ARROW_ASSIGN_OR_RAISE(auto array, internal::GetJsonAs<sj::array>(json_obj)); |
| 498 | |
| 499 | MonthDayNanoIntervalType::MonthDayNanos value; |
| 500 | RETURN_NOT_OK(ProcessJsonArrayElements<3>( |
| 501 | array, "month-day-nano interval", |
| 502 | {[this, &value](sj::value& elem) { |
| 503 | return ConvertNumber<Int32Type>(elem, *this->type_, &value.months); |
| 504 | }, |
| 505 | [this, &value](sj::value& elem) { |
| 506 | return ConvertNumber<Int32Type>(elem, *this->type_, &value.days); |
| 507 | }, |
| 508 | [this, &value](sj::value& elem) { |
| 509 | return ConvertNumber<Int64Type>(elem, *this->type_, &value.nanoseconds); |
| 510 | }})); |
| 511 | return builder_->Append(value); |
| 512 | } |
| 513 | |
| 514 | std::shared_ptr<ArrayBuilder> builder() override { return builder_; } |
| 515 |
nothing calls this directly
no test coverage detected