anshulbaliga7 commented on PR #59226: URL: https://github.com/apache/spark/pull/59226#issuecomment-6108078111
Thanks @stevomitric, I have addressed all four in the second commit. The nested case was a real bug, not intended so `withAnalysisContext(function)` shares the IDENTIFIER accumulator with the caller (right for views as per SPARK-59323), so f2's variable was attributed to g. A new `AnalysisContext` flag turns that sharing off only during function creation and views are unchanged. The new `SQLFunctionSuite` test creates f2 under the legacy flag and confirms g is created with the flag off, while a direct IDENTIFIER read in g's own body is still rejected. The legacy flag is now honored for functions the same way as for views, and its doc mentions functions. Also added a migration-guide entry under 4.2 to 4.3, and golden cases for a relation-name IDENTIFIER, a session.-qualified name, two variables in one body, the legacy flag, and the nested call. Can you PTAL again? Thanks! -- 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]
