wangyum opened a new pull request, #36841:
URL: https://github.com/apache/spark/pull/36841
### What changes were proposed in this pull request?
This PR adds `OptimizeSubqueries` rule into nonExcludableRules list.
### Why are the changes needed?
SQL will throw exception if user `set
spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.Optimizer$OptimizeSubqueries`
before running this query:
```sql
WITH tmp AS (
SELECT id FROM range(2)
INTERSECT
SELECT id FROM range(4)
)
SELECT id FROM range(5) WHERE id > (SELECT max(id) FROM x)
```
Exception:
```
logical intersect operator should have been replaced by semi-join in the
optimizer
java.lang.IllegalStateException: logical intersect operator should have
been replaced by semi-join in the optimizer
```
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Unit test.
--
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]