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/03/19 16:14:00 UTC

[jira] [Commented] (SPARK-34802) Optimize Optimizer defaultBatches rule order

    [ https://issues.apache.org/jira/browse/SPARK-34802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17304997#comment-17304997 ] 

Apache Spark commented on SPARK-34802:
--------------------------------------

User 'wangyum' has created a pull request for this issue:
https://github.com/apache/spark/pull/31901

> Optimize Optimizer defaultBatches rule order
> --------------------------------------------
>
>                 Key: SPARK-34802
>                 URL: https://issues.apache.org/jira/browse/SPARK-34802
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> For example:
> {code:scala}
> spark.sql("CREATE TABLE t1 using parquet AS SELECT id AS a FROM range(10)")
> spark.sql("CREATE TABLE t2 using parquet AS SELECT id AS b FROM range(10)")
> spark.sql("SELECT * FROM t1 INNER JOIN t2 ON (a = b AND true)").explain
> {code}
> {noformat}
> === Applying Rule org.apache.spark.sql.catalyst.optimizer.PushDownPredicates ===
> !Join Inner, ((a#4L = b#5L) AND true)   Join Inner, (a#4L = b#5L)
> !:- Relation default.t1[a#4L] parquet   :- Filter true
> !+- Relation default.t2[b#5L] parquet   :  +- Relation default.t1[a#4L] parquet
> !                                       +- Relation default.t2[b#5L] parquet
> {noformat}
> BooleanSimplification should before PushDownPredicates.



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