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

Function VariantToNode

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

Source from the content-addressed store, hash-verified

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