You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "zabetak (via GitHub)" <gi...@apache.org> on 2023/04/17 11:43:03 UTC

[GitHub] [hive] zabetak commented on a diff in pull request #4170: HIVE-27199: Read TIMESTAMP WITH LOCAL TIME ZONE columns from text files using custom formats

zabetak commented on code in PR #4170:
URL: https://github.com/apache/hive/pull/4170#discussion_r1168561538


##########
common/src/java/org/apache/hive/common/util/TimestampParser.java:
##########
@@ -199,6 +205,19 @@ public Timestamp parseTimestamp(final String text) {
 
   }
 
+  public TimestampTZ parseTimestamp(String text, ZoneId defaultTimeZone) {
+    Objects.requireNonNull(text);
+    for (DateTimeFormatter f : dtFormatters) {
+      try {
+        return TimestampTZUtil.parse(text, defaultTimeZone, f);
+      } catch (DateTimeException e) {

Review Comment:
   Thanks for the comments! Can you elaborate a bit on what you had in mind around try finally?



-- 
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