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

Function VariantToNode

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

Source from the content-addressed store, hash-verified

131}
132
133Status VariantToNode(
134 const std::shared_ptr<::arrow::extension::VariantExtensionType>& type,
135 const std::string& name, bool nullable, int field_id,
136 const WriterProperties& properties, const ArrowWriterProperties& arrow_properties,
137 NodePtr* out) {
138 NodePtr metadata_node;
139 RETURN_NOT_OK(FieldToNode("metadata", type->metadata(), properties, arrow_properties,
140 &metadata_node));
141
142 NodePtr value_node;
143 RETURN_NOT_OK(
144 FieldToNode("value", type->value(), properties, arrow_properties, &value_node));
145
146 *out = GroupNode::Make(name, RepetitionFromNullable(nullable),
147 {std::move(metadata_node), std::move(value_node)},
148 LogicalType::Variant(), field_id);
149
150 return Status::OK();
151}
152
153Status StructToNode(const std::shared_ptr<::arrow::StructType>& type,
154 const std::string& name, bool nullable, int field_id,

Callers 1

FieldToNodeFunction · 0.85

Calls 7

FieldToNodeFunction · 0.85
RepetitionFromNullableFunction · 0.85
MakeFunction · 0.50
VariantClass · 0.50
OKFunction · 0.50
metadataMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected