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