liuxiahuiyi commented on issue #5708:
URL:
https://github.com/apache/incubator-doris/issues/5708#issuecomment-827372975
> 并没有看明白你的问题,能举个栗子吗?
例如有一个table: CREATE TABLE purchase (uuid VARCHAR(20), userid INT, cost
DOUBLE SUM) AGGREGATE KEY (uuid, userid) ,
其中uuid表示一个行的唯一id且没有重复,cost表示该userid的消费金额, 通过在该表示建立rollup或者materialized view
```ALTER TABLE purchase ADD ROLLUP rollup_purchase(userid,
cost)```,可以快速的查询到每个userid的总消费金额是多少。但是,如果在load数据到这张table里时有重复数据,也就是重复的uuid,那么此时该uuid对应的cost会被相加两次,导致结果出现错误。我调研了很久都没看到在doris中能利用数据模型去避免这种重复数据的方法
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]