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

Method AppendValue

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

AppendNullMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected