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

Function GetFieldMetadata

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

Source from the content-addressed store, hash-verified

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