| 66 | } |
| 67 | |
| 68 | Result<std::shared_ptr<ArrowType>> MakeArrowInt(const LogicalType& logical_type) { |
| 69 | const auto& integer = checked_cast<const IntLogicalType&>(logical_type); |
| 70 | switch (integer.bit_width()) { |
| 71 | case 8: |
| 72 | return integer.is_signed() ? ::arrow::int8() : ::arrow::uint8(); |
| 73 | case 16: |
| 74 | return integer.is_signed() ? ::arrow::int16() : ::arrow::uint16(); |
| 75 | case 32: |
| 76 | return integer.is_signed() ? ::arrow::int32() : ::arrow::uint32(); |
| 77 | default: |
| 78 | return Status::TypeError(logical_type.ToString(), |
| 79 | " cannot annotate physical type Int32"); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | Result<std::shared_ptr<ArrowType>> MakeArrowInt64(const LogicalType& logical_type) { |
| 84 | const auto& integer = checked_cast<const IntLogicalType&>(logical_type); |