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

Function ListToNode

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

Source from the content-addressed store, hash-verified

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