| 192 | } |
| 193 | |
| 194 | Result<std::shared_ptr<ArrowType>> FromFLBA( |
| 195 | const LogicalType& logical_type, int32_t physical_length, |
| 196 | const ArrowReaderProperties& reader_properties) { |
| 197 | switch (logical_type.type()) { |
| 198 | case LogicalType::Type::DECIMAL: |
| 199 | return MakeArrowDecimal(logical_type, reader_properties.smallest_decimal_enabled()); |
| 200 | case LogicalType::Type::FLOAT16: |
| 201 | return ::arrow::float16(); |
| 202 | case LogicalType::Type::NONE: |
| 203 | case LogicalType::Type::INTERVAL: |
| 204 | return ::arrow::fixed_size_binary(physical_length); |
| 205 | case LogicalType::Type::UUID: |
| 206 | if (physical_length == 16 && reader_properties.get_arrow_extensions_enabled()) { |
| 207 | return ::arrow::extension::uuid(); |
| 208 | } |
| 209 | |
| 210 | return ::arrow::fixed_size_binary(physical_length); |
| 211 | default: |
| 212 | return Status::NotImplemented("Unhandled logical_type ", logical_type.ToString(), |
| 213 | " for fixed-length binary array"); |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | } // namespace |
| 218 |
no test coverage detected