Fix approximate COUNT DISTINCT codepath

Now that we call get_agg_clause_costs, this becomes easy.
pull/858/head
Jason Petersen 2016-10-11 11:08:52 -06:00
parent 02cde54d2c
commit 6b98a4406a
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
1 changed files with 5 additions and 2 deletions

View File

@ -1487,8 +1487,11 @@ MasterAggregateExpression(Aggref *originalAggregate,
unionAggregate->aggtype = hllType;
unionAggregate->args = list_make1(hllTargetEntry);
unionAggregate->aggkind = AGGKIND_NORMAL;
/* TODO: Fix this for 9.6 */
#if (PG_VERSION_NUM >= 90600)
unionAggregate->aggtranstype = InvalidOid;
unionAggregate->aggargtypes = list_make1_oid(unionAggregate->aggtype);
unionAggregate->aggsplit = AGGSPLIT_SIMPLE;
#endif
cardinalityExpression = makeNode(FuncExpr);
cardinalityExpression->funcid = cardinalityFunctionId;