You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/05/25 12:51:52 UTC

[GitHub] [hive] pvary commented on a diff in pull request #3295: HIVE-26233: Problems reading back PARQUET timestamps above 10000 years

pvary commented on code in PR #3295:
URL: https://github.com/apache/hive/pull/3295#discussion_r881614470


##########
common/src/java/org/apache/hadoop/hive/common/type/Timestamp.java:
##########
@@ -101,6 +101,16 @@ public class Timestamp implements Comparable<Timestamp> {
       // Fractional Part (Optional)
       .optionalStart().appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true).optionalEnd().toFormatter();
 
+  private static final DateTimeFormatter PRINT_LENIENT_FORMATTER = new DateTimeFormatterBuilder()
+      // Date and Time Parts
+      .appendValue(YEAR, 4, 10, SignStyle.NORMAL).appendLiteral('-').appendValue(MONTH_OF_YEAR, 2, 2, SignStyle.NORMAL)
+      .appendLiteral('-').appendValue(DAY_OF_MONTH, 2, 2, SignStyle.NORMAL)
+      .appendLiteral(" ").appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NORMAL).appendLiteral(':')
+      .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NORMAL).appendLiteral(':')
+      .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NORMAL)
+      // Fractional Part (Optional)
+      .optionalStart().appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true).optionalEnd().toFormatter();
+

Review Comment:
   Moved to TimestampTZUtil, and renamed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org