Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Incomplete
-
2.0.2
-
None
Description
This issue aims to allow OuterReference columns in projection lists of IN correlated subqueries.
SIMPLE EXAMPLE
scala> sql("CREATE TEMPORARY VIEW t1 AS SELECT * FROM VALUES 1, 2 AS t1(a)") scala> sql("CREATE TEMPORARY VIEW t2 AS SELECT * FROM VALUES 1 AS t2(b)") scala> sql("SELECT a FROM t1 WHERE a IN (SELECT a FROM t2)").show
COMPLEX EXAMPLE
SELECT * FROM t1 WHERE a IN (SELECT x FROM (SELECT b, a + 1 as x, a + b as y FROM t2) WHERE y > 0)