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

Method AppendValue

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

Source from the content-addressed store, hash-verified

442 }
443
444 Status AppendValue(const rj::Value& json_obj) override {
445 if (json_obj.IsNull()) {
446 return this->AppendNull();
447 }
448 DayTimeIntervalType::DayMilliseconds value;
449 if (!json_obj.IsArray()) {
450 return JSONTypeError("array", json_obj.GetType());
451 }
452 if (json_obj.Size() != 2) {
453 return Status::Invalid(
454 "day time interval pair must have exactly two elements, had ", json_obj.Size());
455 }
456 RETURN_NOT_OK(ConvertNumber<Int32Type>(json_obj[0], *this->type_, &value.days));
457 RETURN_NOT_OK(
458 ConvertNumber<Int32Type>(json_obj[1], *this->type_, &value.milliseconds));
459 return builder_->Append(value);
460 }
461
462 std::shared_ptr<ArrayBuilder> builder() override { return builder_; }
463

Callers

nothing calls this directly

Calls 7

JSONTypeErrorFunction · 0.85
InvalidFunction · 0.50
IsNullMethod · 0.45
AppendNullMethod · 0.45
GetTypeMethod · 0.45
SizeMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected