You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (Jira)" <ji...@apache.org> on 2019/10/16 02:43:00 UTC

[jira] [Commented] (SPARK-29485) Improve BooleanSimplification performance

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

Yuming Wang commented on SPARK-29485:
-------------------------------------

cc [~manifoldQAQ]

> Improve BooleanSimplification performance
> -----------------------------------------
>
>                 Key: SPARK-29485
>                 URL: https://issues.apache.org/jira/browse/SPARK-29485
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> How to reproduce:
> {code:scala}
> val columns = (0 until 1000).map{ i => s"id as id$i"}
> spark.range(1).selectExpr(columns : _*).write.saveAsTable("t1")
> spark.range(1).selectExpr(columns : _*).write.saveAsTable("t2")
> RuleExecutor.resetMetrics()
> spark.table("t1").join(spark.table("t2"), (1 until 800).map(i => s"id${i}")).show(false)
> logWarning(RuleExecutor.dumpTimeSpent())
> {code}
> {noformat}
> === Metrics of Analyzer/Optimizer Rules ===
> Total number of runs: 20157
> Total time: 12.918977054 seconds
> Rule                                                                                               Effective Time / Total Time                     Effective Runs / Total Runs                    
> org.apache.spark.sql.catalyst.optimizer.BooleanSimplification                                      0 / 9835799647                                  0 / 3                                          
> org.apache.spark.sql.catalyst.optimizer.InferFiltersFromConstraints                                1532613008 / 1532613008                         1 / 1                                          
> ...
> {noformat}
> If we disable {{BooleanSimplification}}:
> {noformat}
> === Metrics of Analyzer/Optimizer Rules ===
> Total number of runs: 20154
> Total time: 3.715814437 seconds
> Rule                                                                                               Effective Time / Total Time                     Effective Runs / Total Runs                    
> org.apache.spark.sql.catalyst.optimizer.InferFiltersFromConstraints                                2081338100 / 2081338100                         1 / 1                                          
> ...
> {noformat}



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