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


##########
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:
   ```
     try {
           return TimestampTZUtil.parse(text, defaultTimeZone, f);
         } catch (DateTimeException e) {
         }
   ```
   
   If the catch does not anything it is a bit cleaner if it is just try 
finally. (Again it is just my style :)  It is not a big deal. ) Just when I see 
a catch it would mean I will handle somehow an exception. If I do not do I 
would rather use 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to