zenoyang opened a new issue #8082: URL: https://github.com/apache/incubator-doris/issues/8082
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version master or 0.15 ### What's Wrong? Throws ClassCastException when there are multiple EXCEPT, INTERSECT and UNION in the local view. ### What You Expected? - Query cache is OK ### How to Reproduce? ```sql set enable_sql_cache=true; CREATE TABLE `tbl1` ( `id` int(11) NULL DEFAULT "10" COMMENT "" ) ENGINE=OLAP AGGREGATE KEY(`id`) COMMENT "OLAP" DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "in_memory" = "false", "storage_format" = "V2" ) insert into tbl1 values (1), (2), (3), (4), (5); select count(*) from ( (select * from tbl1 INTERSECT select * from tbl1 ) union select * from tbl1 ) as temp ``` error: ``` ERROR 1064 (HY000): class org.apache.doris.analysis.SetOperationStmt cannot be cast to class org.apache.doris.analysis.SelectStmt (org.apache.doris.analysis.SetOperationStmt and org.apache.doris.analysis.SelectStmt are in unnamed module of loader 'app') ``` ### Anything Else? no ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org