starocean999 opened a new pull request, #35898: URL: https://github.com/apache/doris/pull/35898
## Proposed changes computing unique doesn't work for mv, because mv's key may be different from base table and the key can be any expression which is difficult to deduce if it's unique. for example base table: ``` CREATE TABLE IF NOT EXISTS base( siteid INT(11) NOT NULL, citycode SMALLINT(6) NOT NULL, username VARCHAR(32) NOT NULL, pv BIGINT(20) SUM NOT NULL DEFAULT '0' ) AGGREGATE KEY (siteid,citycode,username) DISTRIBUTED BY HASH(siteid) BUCKETS 5 properties("replication_num" = "1"); ``` case1: create mv1: `create materialized view mv1 as select siteid, sum(pv) from base group by siteid;` the base table siteid + citycode + username is unique but the mv1's agg key siteid is not unique case2: create mv2: `create materialized view mv2 as select citycode * citycode, siteid, username from base;` the mv2's agg key citycode * citycode is not unique for simplicity, we disable unique compute for mv <!--Describe your changes.--> -- 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