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: [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]