Github user tarekauel commented on the pull request:
https://github.com/apache/spark/pull/6981#issuecomment-120535163
@davies thanks I'm going to look a at it.
I had a look on the Jenkins output:
https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/1039/testReport/org.apache.spark.sql.hive.execution/HiveCompatibilitySuite/udf5/
The suite calls `CAST(2008-11-01 15:32:20, DateType)`, but I think `Cast`
can not parse this so far, because we are using the `Date.valueOf`. This cannot
handle date string with time:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/sql/Date.java#Date.valueOf%28java.lang.String%29
https://github.com/apache/spark/blob/09cb0d9c2dcb83818ced22ff9bd6a51688ea7ffe/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala#L221
Shall I create a PR for extending the cast in order to allow parsing date
strings with and without time information?
#############
https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/1039/testReport/org.apache.spark.sql.hive.execution/HiveCompatibilitySuite/udf_minute/
https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/1039/testReport/org.apache.spark.sql.hive.execution/HiveCompatibilitySuite/udf_second/
This test crashes, because we can't cast pure time String, e.g. `13:10:15`
to TimestampObjects? Should we be able to do this?
###############
https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/1039/testReport/org.apache.spark.sql.hive.execution/HiveCompatibilitySuite/udf_weekofyear/
This one fails because of TimeZone settings. Week of year 18 or 19
As I mentioned earlier, the test cases enforce the Locale to US, see
https://github.com/apache/spark/blob/a290814877308c6fa9b0f78b1a81145db7651ca4/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala#L48
Hive calculates a non US value (example see in an earlier comment)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]