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 2017/02/04 23:59:52 UTC

[jira] [Resolved] (SPARK-19425) Make ExtractEquiJoinKeys support UDT columns

     [ https://issues.apache.org/jira/browse/SPARK-19425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiao Li resolved SPARK-19425.
-----------------------------
       Resolution: Fixed
    Fix Version/s: 2.2.0

> Make ExtractEquiJoinKeys support UDT columns
> --------------------------------------------
>
>                 Key: SPARK-19425
>                 URL: https://issues.apache.org/jira/browse/SPARK-19425
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.0
>            Reporter: Liang-Chi Hsieh
>            Assignee: Liang-Chi Hsieh
>             Fix For: 2.2.0
>
>
> DataFrame.except doesn't work for UDT columns. It is because ExtractEquiJoinKeys will run Literal.default against UDT. However, we don't handle UDT in Literal.default and an exception will throw like:
> java.lang.RuntimeException: no default for type 
> org.apache.spark.ml.linalg.VectorUDT@3bfc3ba7
>   at org.apache.spark.sql.catalyst.expressions.Literal$.default(literals.scala:179)
>   at org.apache.spark.sql.catalyst.planning.ExtractEquiJoinKeys$$anonfun$4.apply(patterns.scala:117)
>   at org.apache.spark.sql.catalyst.planning.ExtractEquiJoinKeys$$anonfun$4.apply(patterns.scala:110)
> More simple fix is just let Literal.default handle UDT by its sql type. So we can use more efficient join type on UDT.
> Besides except, this also fixes other similar scenarios, so in summary this fixes:
> * except on two Datasets with UDT
> * intersect on two Datasets with UDT
> * Join with the join conditions using <=> on UDT columns



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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