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

Jia Fan updated SPARK-43308:
----------------------------
    Description: 
When use scalar subquery, sometimes we can get result before physical plan 
execute. 

Like `select (select (count(1)) is null from r where a = c ) from l where a < 
4`.

The result alway be false. So we can skip unnecessary aggregate.

  was:
When use scalar subquery, sometimes we can get result before physical plan 
execute. 

Like `select (select (count(1)) is null from r where a = c group by c) from l 
where a < 4`.

The result alway be false. So we can skip unnecessary aggregate.


> Improve scalar subquery logic plan when result are literal
> ----------------------------------------------------------
>
>                 Key: SPARK-43308
>                 URL: https://issues.apache.org/jira/browse/SPARK-43308
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.5.0
>            Reporter: Jia Fan
>            Priority: Major
>
> When use scalar subquery, sometimes we can get result before physical plan 
> execute. 
> Like `select (select (count(1)) is null from r where a = c ) from l where a < 
> 4`.
> The result alway be false. So we can skip unnecessary aggregate.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to