Integrate updated comment from [email protected].
authorAndres Freund <[email protected]>
Wed, 13 May 2015 17:05:40 +0000 (19:05 +0200)
committerAndres Freund <[email protected]>
Wed, 13 May 2015 17:05:40 +0000 (19:05 +0200)
src/backend/executor/nodeAgg.c

index 47ae90f1cccebf62761aad3b139066cce5b7bf6a..fc1759f832851afd77f5991fa1e8afa7f0362a79 100644 (file)
  *   clause (e.g. (a,b,c), (a,b), (a)) can be processed in a single pass over
  *   ordered data.  We do this by keeping a separate set of transition values
  *   for each grouping set being concurrently processed; for each input tuple
- *   we update them all, and on group boundaries we reset some initial subset
- *   of the states (the list of grouping sets is ordered from most specific to
- *   least specific).  One AGG_SORTED node thus handles any number of grouping
- *   sets as long as they share a sort order.
+ *   we update them all, and on group boundaries we reset those states
+ *   (starting at the front of the list) whose grouping values have changed
+ *   (the list of grouping sets is ordered from most specific to least
+ *   specific).  One AGG_SORTED node thus handles any number of grouping sets
+ *   as long as they share a sort order.
  *
  *   To handle multiple grouping sets that _don't_ share a sort order, we use
  *   a different strategy.  An AGG_CHAINED node receives rows in sorted order