Franklyn Dsouza created SPARK-16629:
---------------------------------------

             Summary: 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
             Fix For: 2.0.0


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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to