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

Function ListToNode

cpp/src/parquet/arrow/schema.cc:98–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 const ArrowWriterProperties& arrow_properties, NodePtr* out);
97
98Status ListToNode(const std::shared_ptr<::arrow::BaseListType>& type,
99 const std::string& name, bool nullable, int field_id,
100 const WriterProperties& properties,
101 const ArrowWriterProperties& arrow_properties, NodePtr* out) {
102 NodePtr element;
103 std::string value_name =
104 arrow_properties.compliant_nested_types() ? "element" : type->value_field()->name();
105 RETURN_NOT_OK(FieldToNode(value_name, type->value_field(), properties, arrow_properties,
106 &element));
107
108 NodePtr list = GroupNode::Make("list", Repetition::REPEATED, {element});
109 *out = GroupNode::Make(name, RepetitionFromNullable(nullable), {list},
110 LogicalType::List(), field_id);
111 return Status::OK();
112}
113
114Status MapToNode(const std::shared_ptr<::arrow::MapType>& type, const std::string& name,
115 bool nullable, int field_id, const WriterProperties& properties,

Callers 1

FieldToNodeFunction · 0.85

Calls 6

FieldToNodeFunction · 0.85
RepetitionFromNullableFunction · 0.85
ListFunction · 0.70
MakeFunction · 0.50
OKFunction · 0.50
nameMethod · 0.45

Tested by

no test coverage detected