You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2015/12/10 08:35:11 UTC
[jira] [Comment Edited] (SPARK-12258) Hive Timestamp UDF is binded
with '1969-12-31 15:59:59.999999' for null value
[ https://issues.apache.org/jira/browse/SPARK-12258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15050246#comment-15050246 ]
Xiao Li edited comment on SPARK-12258 at 12/10/15 7:35 AM:
-----------------------------------------------------------
[~cloud_fan] It sounds like it is related to the PR https://github.com/apache/spark/pull/9770. We just need to include the timestamp, bigDecimal and date in the filter, since they are not primitive types.
If you do not mind, I can try to fix it. Thanks!
was (Author: smilegator):
[~cloud_fan] It sounds like it is related to the PR https://github.com/apache/spark/pull/9770. If you do not mind, I can try to fix it. Thanks!
> Hive Timestamp UDF is binded with '1969-12-31 15:59:59.999999' for null value
> -----------------------------------------------------------------------------
>
> Key: SPARK-12258
> URL: https://issues.apache.org/jira/browse/SPARK-12258
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.6.0
> Reporter: Ian
>
> {code}
> test("Timestamp UDF and Null value") {
> hiveContext.runSqlHive("CREATE TABLE ts_test (ts TIMESTAMP) STORED AS TEXTFILE")
> hiveContext.runSqlHive("INSERT INTO TABLE ts_test VALUES(Null)")
> hiveContext.udf.register("dummy",
> (ts: Timestamp) => ts
> )
> val result = hiveContext.sql("SELECT dummy(ts) FROM ts_test").collect().mkString("\n")
> assertResult("[null]")(result)
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org