peter-toth opened a new pull request #31550:
URL: https://github.com/apache/spark/pull/31550


   ### What changes were proposed in this pull request?
   - Fix to a bug that prevents analysis of
     ```
       CREATE TEMPORARY VIEW temp_view AS WITH cte AS (SELECT temp_func(0)) 
SELECT * FROM cte;
       SELECT * FROM temp_view
     ```
     by properly collecting temporary objects from VIEW definitions with CTEs.
   
   - Minor refactor to make the affected code more readable.
   
   ### Why are the changes needed?
   To fix a bug introduced with https://github.com/apache/spark/pull/30567
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, the query works again.
   
   ### How was this patch tested?
   Added new UT + existing ones.
   


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

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