[ https://issues.apache.org/jira/browse/SPARK-37379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17446234#comment-17446234 ]
Apache Spark commented on SPARK-37379: -------------------------------------- User 'JoshRosen' has created a pull request for this issue: https://github.com/apache/spark/pull/34658 > 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 > Priority: Major > > 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