未验证 提交 fc052796 编写于 作者: J Jinbao Chen 提交者: GitHub

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.
上级 74399541
......@@ -67,8 +67,7 @@ typedef struct AggClauseCosts
{
int numAggs; /* total number of aggregate functions */
int numOrderedAggs; /* number w/ DISTINCT/ORDER BY/WITHIN GROUP */
/* GPDB_94_MERGE_FIXME: does numPureOrderedAggs include WITHIN GROUP aggs? Should it? */
int numPureOrderedAggs; /* CDB: number that use ORDER BY, not counting DISTINCT */
int numPureOrderedAggs; /* CDB: number that use ORDER BY/WITHIN GROUP, not counting DISTINCT */
bool hasNonCombine; /* CDB: any agg func w/o a combine func? */
bool hasNonSerial; /* CDB: is any partial agg non-serializable? */
QualCost transCost; /* total per-input-row execution costs */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册