Remove fixme "does numPureOrderedAggs include WITHIN GROUP aggs? Should it?" (#6879)
Because order-set aggs always have nonempty aggorder, numPureOrderedAggs currently contains WITHIN GROUP aggs. I think this is reasonable. The reason why we add numPureOrderedAggs in AggClauseCosts is that the group aggregate cost is much higher than hash aggregate, and we usually use hash aggregate with DISTINCT and group aggregate with ORDER BY. With within group, we must also use the group aggregate. So, we need to add numPureOrderedAggs when the query cantains a within group agg.
Showing
想要评论请 注册 或 登录