7mming7 created SPARK-44654:
-------------------------------

             Summary: In subquery cannot perform partition pruning
                 Key: SPARK-44654
                 URL: https://issues.apache.org/jira/browse/SPARK-44654
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: 7mming7


The following SQL cannot perform partition pruning
{code:java}
SELECT * FROM parquet_part WHERE id_type in (SELECT max(id_type) from 
parquet_part){code}
As can be seen from the execution plan below, the partition pruning of left 
cannot be performed after the subquery of in is converted into join

!image-2023-08-03-17-17-34-858.png!

The current issue proposes to optimize insubquery. Only when the value of in is 
greater than a threshold, insubquery will be converted into Join



--
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