Userwhite commented on issue #6066:
URL: 
https://github.com/apache/incubator-doris/issues/6066#issuecomment-866781933


   > > 1. 。
   > 
   > 关于2情况:
   
   
   
   > > 1. 无分区:Group by字段包含分桶列
   > > 2. 有分区但数据只命中一个分区的时候和无分区的条件一致
   > 
   > 是这样的,之前1,3 这两种情况确实没覆盖到。后面我加了一个 PR #6029。这个PR 已经覆盖了 1,3 两种情况。你可以用 Master 
代码验证一下。
   > 
   > > 1. 有分区:Group by字段包含分桶列;Group by字段包含分区列(扩宽了条件,显然满足这个的时候,同一组不会在不同分区)
   > 
   > 1. 的问题在于,其实这种并不能够进行 colocate agg。原因是:
   >    当查询命中多分区时,尽管查询的分组列可能是分桶列的子集。但是不同分区的不同分桶可能是在不同be的。这就意味着,下层的agg 
节点并没有完全合并数据。
   
   @EmmyMiao87
   关于2情况:
   比如这样的一张表:
   plan(k1,k2,k3,day,v1) key为(k1,k2,k3),分区列为(day),分桶列是(k1,k2)
   此时Group by k1,k2,day,是可以优化成colocate 
agg的,尽管不同分组数据分布不一致,但是同组数据只会出现在一个分区内,所以是可以直接进行colocate agg的。


-- 
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]

Reply via email to