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 2021/01/28 21:42:39 UTC

[GitHub] [hive] miklosgergely commented on a change in pull request #1927: HIVE-24701: Remove String Manipulation from Date Parsing TimestampTZUtil

miklosgergely commented on a change in pull request #1927:
URL: https://github.com/apache/hive/pull/1927#discussion_r566425919



##########
File path: common/src/java/org/apache/hadoop/hive/common/type/TimestampTZUtil.java
##########
@@ -125,11 +125,6 @@ public static TimestampTZ parseOrNull(String s, ZoneId defaultTimeZone) {
     }
   }
 
-  // Converts Date to TimestampTZ.
-  public static TimestampTZ convert(Date date, ZoneId defaultTimeZone) {
-    return parse(date.toString(), defaultTimeZone);
-  }
-
   // Converts Timestamp to TimestampTZ.
   public static TimestampTZ convert(Timestamp ts, ZoneId defaultTimeZone) {

Review comment:
       Nice catch, this is indeed an unnecessarily slow solution! This other convert function right next to it has the same issue, please fix that too in the same patch!




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

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