Marco Gaido created SPARK-22413:
-----------------------------------
Summary: 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: [email protected]
For additional commands, e-mail: [email protected]