MCPcopy Create free account
hub / github.com/apache/arrow / MakeArrowTime64

Function MakeArrowTime64

cpp/src/parquet/arrow/schema_internal.cc:91–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91Result<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
104Result<std::shared_ptr<ArrowType>> MakeArrowTimestamp(const LogicalType& logical_type) {
105 const auto& timestamp = checked_cast<const TimestampLogicalType&>(logical_type);

Callers 1

FromInt64Function · 0.85

Calls 4

time64Function · 0.50
TypeErrorFunction · 0.50
time_unitMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected