You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Nattavut Sutyanyong (JIRA)" <ji...@apache.org> on 2017/03/14 21:49:41 UTC
[jira] [Commented] (SPARK-18603) Support `OuterReference` in
projection list of IN correlated subqueries
[ https://issues.apache.org/jira/browse/SPARK-18603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925092#comment-15925092 ]
Nattavut Sutyanyong commented on SPARK-18603:
---------------------------------------------
[~dongjoon] Now that the first phase of the subquery that lays a new infrastructure has been merged to master, we can start this work on top. Please let me know when you will start working on it. We can collaborate here.
> Support `OuterReference` in projection list of IN correlated subqueries
> -----------------------------------------------------------------------
>
> Key: SPARK-18603
> URL: https://issues.apache.org/jira/browse/SPARK-18603
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 2.0.2
> Reporter: Dongjoon Hyun
>
> This issue aims to allow OuterReference columns in projection lists of IN correlated subqueries.
> *SIMPLE EXAMPLE*
> {code}
> 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
> {code}
> *COMPLEX EXAMPLE*
> {code}
> SELECT *
> FROM t1
> WHERE a IN (SELECT x
> FROM (SELECT b, a + 1 as x, a + b as y
> FROM t2)
> WHERE y > 0)
> {code}
--
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