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

Function GetFieldMetadata

cpp/src/arrow/adapters/orc/util.cc:1202–1216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1200}
1201
1202Result<std::shared_ptr<const KeyValueMetadata>> GetFieldMetadata(
1203 const liborc::Type* type) {
1204 if (type == nullptr) {
1205 return nullptr;
1206 }
1207 const auto keys = type->getAttributeKeys();
1208 if (keys.empty()) {
1209 return nullptr;
1210 }
1211 auto metadata = std::make_shared<KeyValueMetadata>();
1212 for (const auto& key : keys) {
1213 metadata->Append(key, type->getAttributeValue(key));
1214 }
1215 return std::const_pointer_cast<const KeyValueMetadata>(metadata);
1216}
1217
1218Result<std::shared_ptr<Field>> GetArrowField(const std::string& name,
1219 const liborc::Type* type, bool nullable) {

Callers 2

LoadCommonMethod · 0.85
VisitMethod · 0.85

Calls 2

emptyMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected