You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2017/11/01 20:52:00 UTC

[jira] [Commented] (SPARK-22413) Type coercion for IN is not coherent between Literals and subquery

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

Apache Spark commented on SPARK-22413:
--------------------------------------

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

> Type coercion for IN is not coherent between Literals and subquery
> ------------------------------------------------------------------
>
>                 Key: SPARK-22413
>                 URL: https://issues.apache.org/jira/browse/SPARK-22413
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.0
>            Reporter: Marco Gaido
>            Priority: Major
>
> The IN statement can have a different behavior according to whether there is a list of literals or a subquery, because the type coercion works differently in the two cases.
> This means, that these two equivalent queries return different results:
> {code}
> select 1 from (select 1) a where 1 in ('01'); // this returns an empty dataset
> select 1 from (select 1) a where 1 in (select '01' from (select 1)); // returns 1 row
> {code}



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

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