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/10/13 13:12:45 UTC
[GitHub] [hive] zabetak commented on a change in pull request #2690: HIVE-25576: Add config to parse date with older date format
zabetak commented on a change in pull request #2690:
URL: https://github.com/apache/hive/pull/2690#discussion_r728036705
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -3711,6 +3711,11 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal
"1800s", new TimeValidator(TimeUnit.SECONDS),
"Interval to synchronize privileges from external authorizer periodically in HS2"),
+ HIVE_LEGACY_TIMEPARSER_POLICY("hive.legacy.timeparser.policy", false,
Review comment:
How about renaming to `hive.datetime.formatter.legacy.enabled`? That way we create a `hive.datetime` namespace which we can use for other props in the future.
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -3711,6 +3711,11 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal
"1800s", new TimeValidator(TimeUnit.SECONDS),
"Interval to synchronize privileges from external authorizer periodically in HS2"),
+ HIVE_LEGACY_TIMEPARSER_POLICY("hive.legacy.timeparser.policy", false,
Review comment:
One thing that I am a bit skeptical about is that when I search for `SimpleDateFormat` or `DateTimeFormatter` in the repo I find occurrences in various places (including other UDFs). I am wondering what should we do with the other parts using new/old formatters. The current description of the property makes me believe that it has a kind of global effect but in this PR we are only touching the Unix timestamp UDFs.
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -3711,6 +3711,11 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal
"1800s", new TimeValidator(TimeUnit.SECONDS),
"Interval to synchronize privileges from external authorizer periodically in HS2"),
+ HIVE_LEGACY_TIMEPARSER_POLICY("hive.legacy.timeparser.policy", false,
+ "When true, java.text.SimpleDateFormat is used for formatting and parsing\n"
+ + "dates/timestamps in a locale-sensitive manner, which is the approach before Hive 3.x.\n"
+ + "When set to false, classes from java.time.* packages are used for the same purpose.\n"
+ + "The default value is false, RuntimeException is thrown when we will get different results."),
Review comment:
Do we throw an exception? I don't think so.
--
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