Skip to content

Commit

Permalink
resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Jan 8, 2024
1 parent bba8938 commit 4ab6336
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions cpp/src/parquet/arrow/schema_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ Result<std::shared_ptr<ArrowType>> MakeArrowTime64(const LogicalType& logical_ty

Result<std::shared_ptr<ArrowType>> MakeArrowTimestamp(const LogicalType& logical_type) {
const auto& timestamp = checked_cast<const TimestampLogicalType&>(logical_type);
const bool utc_normalized =
timestamp.is_from_converted_type() ? true : timestamp.is_adjusted_to_utc();
const bool utc_normalized = timestamp.is_adjusted_to_utc();
static const char* utc_timezone = "UTC";
switch (timestamp.time_unit()) {
case LogicalType::TimeUnit::MILLIS:
Expand Down
3 changes: 3 additions & 0 deletions cpp/src/parquet/types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ std::shared_ptr<const LogicalType> LogicalType::FromConvertedType(
case ConvertedType::DATE:
return DateLogicalType::Make();
case ConvertedType::TIME_MILLIS:
// ConvertedType::TIME_{*} are deprecated in favor of LogicalType::TIME, the
// compatibility for ConvertedType::TIME_{*} are listed in
// https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#deprecated-time-convertedtype
return TimeLogicalType::Make(/*is_adjusted_to_utc=*/true,
LogicalType::TimeUnit::MILLIS);
case ConvertedType::TIME_MICROS:
Expand Down

0 comments on commit 4ab6336

Please sign in to comment.