[ 
https://issues.apache.org/jira/browse/SPARK-22894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302562#comment-16302562
 ] 

Apache Spark commented on SPARK-22894:
--------------------------------------

User 'wangyum' has created a pull request for this issue:
https://github.com/apache/spark/pull/20067

> DateTimeOperations should accept SQL like string type
> -----------------------------------------------------
>
>                 Key: SPARK-22894
>                 URL: https://issues.apache.org/jira/browse/SPARK-22894
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.3.0
>            Reporter: Yuming Wang
>
> {noformat}
> spark-sql> SELECT '2017-12-24' + interval 2 months 2 seconds;
> Error in query: cannot resolve '(CAST('2017-12-24' AS DOUBLE) + interval 2 
> months 2 seconds)' due to data type mismatch: differing types in 
> '(CAST('2017-12-24' AS DOUBLE) + interval 2 months 2 seconds)' (double and 
> calendarinterval).; line 1 pos 7;
> 'Project [unresolvedalias((cast(2017-12-24 as double) + interval 2 months 2 
> seconds), None)]
> +- OneRowRelation
> spark-sql> 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to