lgbo-ustc commented on issue #7311:
URL:
https://github.com/apache/incubator-gluten/issues/7311#issuecomment-2408422282
该用例暴露了比较多的问题。
### 需要区分聚合阶段AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE
和 AGGREGATION_PHASE_INTERMEDIATE_TO_INTERMEDIATE
在当前的实现中,这个两个状态是同等对待的。都是用
`StreamingAggregatingStep`来对待。实际上处于AGGREGATION_PHASE_INTERMEDIATE_TO_INTERMEDIATE
状态时,不一定能采用streaming的方式来处理。一些情况下,必须消费完所有数据,完成聚合,才能向下游生成数据。如count(distint x)
和其他聚合函数混用时。
为了应对高基数可能引起OOM的情况,引入了`GraceAggregatingStep`。这个沿用之前的代码,可以快速实现,相对简单。
### `CH` 一个执行步骤内对多聚合阶段的支持
`CH`默认一个执行步骤内只有一种聚合阶段。但在spark中,会出现多种聚合解读的情况,如AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE
和 AGGREGATION_PHASE_INTERMEDIATE_TO_INTERMEDIATE。我们需要更新聚合step的output
header的生成方式。
### 多聚合阶段折叠
`MergeTwoPhasesHashBaseAggregate` 会将两个在聚合阶段合并为同一个。这会影响判断采用哪种聚合 step。我们必须做出修正。
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]