| 1526 | } |
| 1527 | |
| 1528 | std::shared_ptr<const LogicalType> TimestampLogicalType::Make( |
| 1529 | bool is_adjusted_to_utc, LogicalType::TimeUnit::unit time_unit, |
| 1530 | bool is_from_converted_type, bool force_set_converted_type) { |
| 1531 | if (time_unit == LogicalType::TimeUnit::MILLIS || |
| 1532 | time_unit == LogicalType::TimeUnit::MICROS || |
| 1533 | time_unit == LogicalType::TimeUnit::NANOS) { |
| 1534 | auto* logical_type = new TimestampLogicalType(); |
| 1535 | logical_type->impl_.reset(new LogicalType::Impl::Timestamp( |
| 1536 | is_adjusted_to_utc, time_unit, is_from_converted_type, force_set_converted_type)); |
| 1537 | return std::shared_ptr<const LogicalType>(logical_type); |
| 1538 | } else { |
| 1539 | throw ParquetException( |
| 1540 | "TimeUnit must be one of MILLIS, MICROS, or NANOS for Timestamp logical type"); |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | bool TimestampLogicalType::is_adjusted_to_utc() const { |
| 1545 | return (dynamic_cast<const LogicalType::Impl::Timestamp&>(*impl_)).is_adjusted_to_utc(); |
nothing calls this directly
no test coverage detected