sankarh commented on a change in pull request #2252:
URL: https://github.com/apache/hive/pull/2252#discussion_r634218204
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/util/DateTimeMath.java
##########
@@ -613,4 +615,18 @@ public static Calendar getProlepticGregorianCalendarUTC() {
calendar.setGregorianChange(new java.util.Date(Long.MIN_VALUE));
return calendar;
}
+
+ /**
+ * TODO - this is a temporary fix for handling Julian calendar dates.
+ * Returns a Gregorian calendar that can be used from year 0+ instead of
default 1582.10.15.
+ * This is desirable for some UDFs that work on dates which normally would
use Julian calendar.
+ * @return the calendar
+ */
+ public static Calendar getTimeZonedProlepticGregorianCalendar() {
+ GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone(
+ SessionState.get() == null ? new HiveConf().getLocalTimeZone() :
SessionState.get().getConf()
Review comment:
Use () for condition.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]