| 52 | } |
| 53 | |
| 54 | Result<std::shared_ptr<ArrowType>> MakeArrowInt(const LogicalType& logical_type) { |
| 55 | const auto& integer = checked_cast<const IntLogicalType&>(logical_type); |
| 56 | switch (integer.bit_width()) { |
| 57 | case 8: |
| 58 | return integer.is_signed() ? ::arrow::int8() : ::arrow::uint8(); |
| 59 | case 16: |
| 60 | return integer.is_signed() ? ::arrow::int16() : ::arrow::uint16(); |
| 61 | case 32: |
| 62 | return integer.is_signed() ? ::arrow::int32() : ::arrow::uint32(); |
| 63 | default: |
| 64 | return Status::TypeError(logical_type.ToString(), |
| 65 | " cannot annotate physical type Int32"); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | Result<std::shared_ptr<ArrowType>> MakeArrowInt64(const LogicalType& logical_type) { |
| 70 | const auto& integer = checked_cast<const IntLogicalType&>(logical_type); |