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

Method Make

cpp/src/parquet/types.cc:1528–1542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1526}
1527
1528std::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
1544bool TimestampLogicalType::is_adjusted_to_utc() const {
1545 return (dynamic_cast<const LogicalType::Impl::Timestamp&>(*impl_)).is_adjusted_to_utc();

Callers

nothing calls this directly

Calls 2

ParquetExceptionFunction · 0.85
resetMethod · 0.45

Tested by

no test coverage detected