deniskuzZ commented on code in PR #4959:
URL: https://github.com/apache/hive/pull/4959#discussion_r1507334179


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java:
##########
@@ -107,6 +107,17 @@ public static Date convertStringToDate(String date) {
     return java.sql.Date.valueOf(val);
   }
 
+  /**
+   * Converts the string format date without a time-zone to
+   * a time-zone based string format date
+   * @param date the date without a time-zone
+   * @return time-zone based string format date
+   */
+  public static String normalizeDate(String date) {
+    Date val = MetaStoreUtils.convertStringToDate(date);

Review Comment:
   minor, up to you:
   ````
   return convertDateToString(convertStringToDate(date));
   ````
   also we could reuse the new method in `BaseSemanticAnalyzer#normalizeDateCol`



-- 
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-unsubscr...@hive.apache.org

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


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

Reply via email to