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 2021/10/29 02:07:00 UTC

[jira] [Assigned] (SPARK-37131) Support use IN/EXISTS with subquery in Project/Aggregate

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

Apache Spark reassigned SPARK-37131:
------------------------------------

    Assignee: Apache Spark

> Support use IN/EXISTS with subquery in Project/Aggregate
> --------------------------------------------------------
>
>                 Key: SPARK-37131
>                 URL: https://issues.apache.org/jira/browse/SPARK-37131
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Tongwei
>            Assignee: Apache Spark
>            Priority: Major
>
> {code:java}
> CREATE TABLE tbl1 (col1 INT, col2 STRING) USING PARQUET;
> INSERT OVERWRITE TABLE tbl1 SELECT 0,1;
> CREATE TABLE tbl2 (c1 INT, c2 STRING) USING PARQUET; 
> INSERT OVERWRITE TABLE tbl2 SELECT 0,2;
> case 1:
>     select c1 in (select col1 from tbl1) from tbl2 
>     Error msg:
>         IN/EXISTS predicate sub-queries can only be used in Filter/Join and a few commands: Project []
> case 2:
>     select count(1), case when c1 in (select col1 from tbl1) then "A" else "B" end as tag from tbl2 group by case when c1 in (select col1 from tbl1) then "A" else "B" end 
>     Error msg:
>         IN/EXISTS predicate sub-queries can only be used in Filter/Join and a few commands: Aggregate []
> {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