You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/02/24 09:59:00 UTC
[jira] [Updated] (SPARK-55654) Enable TreePattern pruning for EliminateSubqueryAliases and ResolveInlineTables
[ https://issues.apache.org/jira/browse/SPARK-55654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated SPARK-55654:
-----------------------------------
Labels: pull-request-available (was: )
> Enable TreePattern pruning for EliminateSubqueryAliases and ResolveInlineTables
> -------------------------------------------------------------------------------
>
> Key: SPARK-55654
> URL: https://issues.apache.org/jira/browse/SPARK-55654
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 4.2.0
> Reporter: Kent Yao
> Priority: Major
> Labels: pull-request-available
>
> Replace AlwaysProcess.fn with pattern-based pruning in two Analyzer rules:
> 1. EliminateSubqueryAliases: Use _.containsPattern(SUBQUERY_ALIAS)
> - Skips entire plan traversal when no SubqueryAlias nodes exist
> - Common in resolved plans after initial resolution passes
> 2. ResolveInlineTables: Use _.containsPattern(INLINE_TABLE_EVAL)
> - Skips traversal when no UnresolvedInlineTable nodes exist
> - Inline tables are rare; most queries never contain them
> Also adds INLINE_TABLE_EVAL to UnresolvedInlineTable.nodePatterns, which was previously only defined on ResolvedInlineTable. Without this, the pruning condition could never be satisfied for unresolved inline tables.
> Both rules previously used AlwaysProcess.fn, forcing full tree traversal on every fixedPoint iteration even when no matching nodes existed. TreePatternBits propagation enables O(1) root-level short-circuit.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org