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

Method AppendValue

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

Source from the content-addressed store, hash-verified

420 }
421
422 Status AppendValue(sj::value& json_obj) override {
423 ARROW_ASSIGN_OR_RAISE(bool is_null, internal::IsJsonNull(json_obj));
424 if (is_null) {
425 return this->AppendNull();
426 }
427 int64_t value;
428 std::string_view view;
429 if (json_obj.get(view) == simdjson::SUCCESS) {
430 if (!ParseValue(*timestamp_type_, view.data(), view.size(), &value)) {
431 return Status::Invalid("couldn't parse timestamp from ", view);
432 }
433 } else {
434 RETURN_NOT_OK(ConvertNumber<Int64Type>(json_obj, *this->type_, &value));
435 }
436 return builder_->Append(value);
437 }
438
439 std::shared_ptr<ArrayBuilder> builder() override { return builder_; }
440

Callers

nothing calls this directly

Calls 7

ParseValueFunction · 0.85
InvalidFunction · 0.50
AppendNullMethod · 0.45
getMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected