spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wenchen Fan (Jira)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-29860) [SQL] Fix data type mismatch issue for inSubQuery
Date Thu, 05 Dec 2019 08:02:00 GMT

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

Wenchen Fan resolved SPARK-29860.
---------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Issue resolved by pull request 26485
[https://github.com/apache/spark/pull/26485]

> [SQL] Fix data type mismatch issue for inSubQuery
> -------------------------------------------------
>
>                 Key: SPARK-29860
>                 URL: https://issues.apache.org/jira/browse/SPARK-29860
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.4
>            Reporter: feiwang
>            Assignee: feiwang
>            Priority: Major
>             Fix For: 3.0.0
>
>
> The follow statement would throw an exception.
> {code:java}
>       sql("create table ta(id Decimal(18,0)) using parquet")
>       sql("create table tb(id Decimal(19,0)) using parquet")
>       sql("select * from ta where id in (select id from tb)").shown()
> {code}
> {code:java}
> // Exception information
> cannot resolve '(default.ta.`id` IN (listquery()))' due to data type mismatch: 
> The data type of one or more elements in the left hand side of an IN subquery
> is not compatible with the data type of the output of the subquery
> Mismatched columns:
> [(default.ta.`id`:decimal(18,0), default.tb.`id`:decimal(19,0))]
> Left side:
> [decimal(18,0)].
> Right side:
> [decimal(19,0)].;;
> 'Project [*]
> +- 'Filter id#219 IN (list#218 [])
>    :  +- Project [id#220]
>    :     +- SubqueryAlias `default`.`tb`
>    :        +- Relation[id#220] parquet
>    +- SubqueryAlias `default`.`ta`
>       +- Relation[id#219] parquet
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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


Mime
View raw message