* right tlist, and it has no sort order.
*/
current_pathkeys = NIL;
- /*
- * In fact, since we don't optimize grouped aggregates, it
- * needs no sort order --- there must be exactly one output row,
- * and so any ORDER BY or DISTINCT attached to the query is
- * useless and can be dropped. Aside from saving useless cycles,
- * this protects us against problems with matching the hacked-up
- * tlist entries to sort clauses.
- */
- Assert(!parse->groupClause);
- parse->sortClause = NULL;
- parse->distinctClause = NULL;
}
else
{