| 455 | } |
| 456 | |
| 457 | Status AppendValue(sj::value& json_obj) override { |
| 458 | ARROW_ASSIGN_OR_RAISE(bool is_null, internal::IsJsonNull(json_obj)); |
| 459 | if (is_null) { |
| 460 | return this->AppendNull(); |
| 461 | } |
| 462 | |
| 463 | ARROW_ASSIGN_OR_RAISE(auto array, internal::GetJsonAs<sj::array>(json_obj)); |
| 464 | |
| 465 | DayTimeIntervalType::DayMilliseconds value; |
| 466 | RETURN_NOT_OK(ProcessJsonArrayElements<2>( |
| 467 | array, "day-time interval", |
| 468 | {[this, &value](sj::value& elem) { |
| 469 | return ConvertNumber<Int32Type>(elem, *this->type_, &value.days); |
| 470 | }, |
| 471 | [this, &value](sj::value& elem) { |
| 472 | return ConvertNumber<Int32Type>(elem, *this->type_, &value.milliseconds); |
| 473 | }})); |
| 474 | return builder_->Append(value); |
| 475 | } |
| 476 | |
| 477 | std::shared_ptr<ArrayBuilder> builder() override { return builder_; } |
| 478 |
nothing calls this directly
no test coverage detected