| 1200 | } |
| 1201 | |
| 1202 | Result<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 | |
| 1218 | Result<std::shared_ptr<Field>> GetArrowField(const std::string& name, |
| 1219 | const liborc::Type* type, bool nullable) { |
no test coverage detected