Josh Rosen created SPARK-37379:
----------------------------------

             Summary: Add tree pattern pruning to CTESubstitution rule
                 Key: SPARK-37379
                 URL: https://issues.apache.org/jira/browse/SPARK-37379
             Project: Spark
          Issue Type: Sub-task
          Components: Optimizer
    Affects Versions: 3.1.0
            Reporter: Josh Rosen
            Assignee: Josh Rosen


I propose to add tree pattern pruning to the CTESubstitution rule in order to 
skip tree traversal when the tree does not contain an UnresolvedWith expression.

This is motivated by profiling a job which uses DataFrame APIs to incrementally 
construct a huge query plan (200k+ nodes): each API call results in eager 
re-analysis of the plan, of which CTESubstitution accounts for the majority of 
the analysis time. This query didn't contain CTEs, so skipping the 
CTESubstitution significantly speeds up analysis.

I plan to submit a patch for this.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to