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

Method Init

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

Source from the content-addressed store, hash-verified

631 explicit MapConverter(const std::shared_ptr<DataType>& type) { type_ = type; }
632
633 Status Init() override {
634 const auto& map_type = checked_cast<const MapType&>(*type_);
635 RETURN_NOT_OK(GetConverter(map_type.key_type(), &key_converter_));
636 RETURN_NOT_OK(GetConverter(map_type.item_type(), &item_converter_));
637 auto key_builder = key_converter_->builder();
638 auto item_builder = item_converter_->builder();
639 builder_ = std::make_shared<MapBuilder>(default_memory_pool(), key_builder,
640 item_builder, type_);
641 return Status::OK();
642 }
643
644 Status AppendValue(sj::value& json_obj) override {
645 ARROW_ASSIGN_OR_RAISE(bool is_null, internal::IsJsonNull(json_obj));

Callers 2

GetDictConverterFunction · 0.45
GetConverterFunction · 0.45

Calls 4

default_memory_poolFunction · 0.85
GetConverterFunction · 0.70
OKFunction · 0.70
builderMethod · 0.45

Tested by

no test coverage detected