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

Method Init

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

Source from the content-addressed store, hash-verified

703 explicit StructConverter(const std::shared_ptr<DataType>& type) { type_ = type; }
704
705 Status Init() override {
706 std::vector<std::shared_ptr<ArrayBuilder>> child_builders;
707 for (const auto& field : type_->fields()) {
708 std::shared_ptr<JSONConverter> child_converter;
709 RETURN_NOT_OK(GetConverter(field->type(), &child_converter));
710 child_converters_.push_back(child_converter);
711 child_builders.push_back(child_converter->builder());
712 }
713 builder_ = std::make_shared<StructBuilder>(type_, default_memory_pool(),
714 std::move(child_builders));
715 return Status::OK();
716 }
717
718 // Append a JSON value that is either an array of N elements in order
719 // or an object mapping struct names to values (omitted struct members

Callers

nothing calls this directly

Calls 7

default_memory_poolFunction · 0.85
push_backMethod · 0.80
GetConverterFunction · 0.70
OKFunction · 0.70
fieldsMethod · 0.45
typeMethod · 0.45
builderMethod · 0.45

Tested by

no test coverage detected