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

Apache Spark commented on SPARK-16629:
--------------------------------------

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

> UDTs can not be compared to DataTypes in dataframes.
> ----------------------------------------------------
>
>                 Key: SPARK-16629
>                 URL: https://issues.apache.org/jira/browse/SPARK-16629
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 2.0.0
>            Reporter: Franklyn Dsouza
>
> Currently UDTs can not be compared to Datatypes even if their sqlTypes match. 
> this leads to errors like this 
> {code}
> In [12]: filtered = df.filter(df['udt_time'] > threshold)
> ---------------------------------------------------------------------------
> AnalysisException                         Traceback (most recent call last)
> /Users/franklyndsouza/dev/starscream/bin/starscream in <module>()
> ----> 1 thresholded = df.filter(df['udt_time'] > threshold)
> AnalysisException: u"cannot resolve '(`udt_time` > TIMESTAMP('2015-10-20 
> 01:00:00.0'))' due to data typ mismatch: '(`udt_time` > TIMESTAMP('2015-10-20 
> 01:00:00.0'))' requires (boolean or tinyint or smallint or int or bigint or 
> float or double or decimal or timestamp or date or string or binary) type, 
> not pythonuserdefined"
> {code}
> i've proposed a fix for this here https://github.com/apache/spark/pull/14164



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to