peter-toth opened a new pull request #31592:
URL: https://github.com/apache/spark/pull/31592
### What changes were proposed in this pull request?
This PR:
- Fixes a bug that doesn't report analysis error when it should:
```
CREATE TEMPORARY VIEW temp_view AS SELECT 0;
CREATE VIEW view_on_temp_view AS WITH cte AS (SELECT * FROM temp_view)
SELECT * FROM cte
```
by properly checking temporary objects in view definitions with CTEs.
### Why are the changes needed?
To fix a bug.
### Does this PR introduce _any_ user-facing change?
Yes, analysis error is thrown as expected.
### 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]