| 89 | } |
| 90 | |
| 91 | Result<std::shared_ptr<ArrowType>> MakeArrowTime64(const LogicalType& logical_type) { |
| 92 | const auto& time = checked_cast<const TimeLogicalType&>(logical_type); |
| 93 | switch (time.time_unit()) { |
| 94 | case LogicalType::TimeUnit::MICROS: |
| 95 | return ::arrow::time64(::arrow::TimeUnit::MICRO); |
| 96 | case LogicalType::TimeUnit::NANOS: |
| 97 | return ::arrow::time64(::arrow::TimeUnit::NANO); |
| 98 | default: |
| 99 | return Status::TypeError(logical_type.ToString(), |
| 100 | " cannot annotate physical type Time64"); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | Result<std::shared_ptr<ArrowType>> MakeArrowTimestamp(const LogicalType& logical_type) { |
| 105 | const auto& timestamp = checked_cast<const TimestampLogicalType&>(logical_type); |