jlerebours opened a new issue, #17309: URL: https://github.com/apache/doris/issues/17309
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version 1.2.1 ### What's Wrong? Impossible to create the simplest materialized view having a group by for a table with aggregate model ### What You Expected? To be able to create a view on an Aggregate Key model, nothing in the documentation specifying it should not work. According to me that's the base use case of aggregate model no ? ### How to Reproduce? I just used the simplest example visible in the documentation and added a REPLACE on one column so that my model is of type Aggregate. Here are the steps to reproduce : ``` - create table sales_records(record_id int, seller_id int, store_id int, sale_date date, sale_amt bigint REPLACE) distributed by hash(record_id) ; - show create table sales_records - insert into sales_records values(1,1,1,"2020-02-02",1); - create materialized view store_amt as select store_id, sum(sale_amt) from sales_records group by store_id; ``` The last query returns this error : `ERROR 1105 (HY000): errCode = 2, detailMessage = The aggregation type of column[sale_amt] must be same as the aggregate type of base column in aggregate table` ### Anything Else? If you just remove the REPLACE for the column sale_amt, then the model of table becomes Duplicate Key and materialized view can be created without problem. I also tested without the sum, just with a simple select of a field and same problem : ``` - create table sales_records(record_id int, seller_id int, store_id int REPLACE, sale_date date REPLACE, sale_amt bigint REPLACE) distributed by hash(record_id); - insert into sales_records values(1,1,1,"2020-02-02",1); - create materialized view store_amt as select store_id, sum(sale_amt) from sales_records group by store_id; ``` Sorry if my issue is not very clean, that's my first one ! ### Are you willing to submit PR? - [ ] 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