shivadarshan-devadiga commented on PR #60756:
URL: https://github.com/apache/spark/pull/60756#issuecomment-7062493900

   Thanks @gengliangwang. All three are addressed in this push. Your 
`SimplifyConditionals` example shows that the optimizer can't be held to 
keeping the CHAR types of the children equal, since any rewrite that turns an 
expression into a column exposes the column's raw type. So I've gone with the 
first option from your earlier design comment instead:
   - Every run of the analyzer is now part of the analysis phase: 
`Analyzer.execute` opens `markInAnalyzer`, as `executeAndCheck` does.
   - The optimizer runs outside it: `Optimizer.execute` clears the counter with 
a new `markOutsideAnalyzer`, so a query that an analyzer rule optimizes isn't 
part of the analysis.
   - `isInAnalyzer` is documented as that phase signal.
   
   Can you please re-review?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to