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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to