ashish-kumar-sharma commented on a change in pull request #2590:
URL: https://github.com/apache/hive/pull/2590#discussion_r692812560
##########
File path: ql/src/test/queries/clientpositive/udf_to_unix_timestamp.q
##########
@@ -18,8 +18,8 @@ SELECT
FROM oneline_n0;
SELECT
- '2009 Mar 20 11:30:01 am',
- to_unix_timestamp('2009 Mar 20 11:30:01 am', 'yyyy MMM dd h:mm:ss a')
+ '2009 Mar 20 11:30:01 AM',
Review comment:
simpleDateFromat and DateTimeformatter both used
locale(https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html) to
parse alphabet. By default system local in picked to in both the case.
simpleDateFromat use Locale.getDefault(Locale.Category.FORMAT)) which is list
of locale due to "AM" and "am" but not "aM" or "Am". Where as DateTimeformatter
used only system default locale also DateTimeformatter by default in case
Sensitive as well. If supports only "AM"/"am" which is not in our control. I Do
align the point the date value should be case insensitive but I couldn't able
to find any DateTimeFromatter implementation with in hive code. But still in
order to make unix_timestamp backword compatible we need to make
DateTimeformatter case insensitive.
--
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]