Kikyou1997 opened a new issue, #9876: URL: https://github.com/apache/incubator-doris/issues/9876
### 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 1.0 ### What's Wrong? Execution of a query statement having a `COUNT` aggregate function which could trigger a materialized view will get the unknown column exception, and the column name corresponds to the rewrited materialized column of the parameter of aggregate function. ### What You Expected? return the result set normally ### How to Reproduce? 1. ```sql CREATE TABLE case_tbl (col1 varchar, col2 varchar, col3 int) DISTRIBUTED BY HASH(col3) BUCKETS 3 PROPERTIES( "replication_num"="1" ); ``` 2. ```sql create materialized view case_mv as select col2, count(col1) as c from d_test2 d_test2 group by col1, col2; ``` 3. ```sql select col2, count(col1) as c from d_test2 d_test2 group by col1, col2; ``` ### Anything Else? _No response_ ### 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.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