You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Matvei Zamiatin (Jira)" <ji...@apache.org> on 2026/08/19 09:06:00 UTC

[jira] [Created] (SPARK-58866) Add expression-level entry points to optimizer rules for the single-pass analyzer

Matvei Zamiatin created SPARK-58866:
---------------------------------------

             Summary: Add expression-level entry points to optimizer rules for the single-pass analyzer
                 Key: SPARK-58866
                 URL: https://issues.apache.org/jira/browse/SPARK-58866
             Project: Spark
          Issue Type: Task
          Components: Optimizer
    Affects Versions: 4.4.0
            Reporter: Matvei Zamiatin


The single-pass analyzer needs to run several optimizer rules on individual, freshly-resolved expression trees rather than on a whole LogicalPlan. For example, resolving a procedure CALL requires folding and rewriting its argument expressions (constant folding, With inlining, RuntimeReplaceable expansion, current date/time and current catalog/database substitution, special datetime values) before they are used.

Today these rules only expose plan-level apply(plan: LogicalPlan) entry points. This ticket refactors them to also expose expression-level entry points by extracting the shared rewrite logic into partial functions, with no behavior change to the existing plan-level apply.



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