diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index 3de11f0..570eb2d 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -266,7 +266,20 @@ typedef struct Param * replaced with a single argument representing the partial-aggregate * transition values. * - * XXX need more documentation about partial aggregation here + * 'aggcombine' and 'aggpartial' define what the expected input values and + * what the expected output value for the aggregate will be. By default both + * of these are False, and are only ever True when aggregation must take place + * in multiple stages, such as parallel aggregation. In this case the + * aggregate value will be calculated in two stages. The first stage will take + * normal input values and aggregate them, but not call the final function on + * any of these values. Instead the transition state is returned to the + * caller. Such a setup will require that the 2nd executor node will perform + * the finalization of the aggregate, and such a node would be set up to have + * 'aggpartial' set to False, and would have 'aggcombine' set to True (since + * the expected input values are expected to be transition states, rather than + * normal input values). It is also possible for aggregation to take place in + * more than two stages, where an intermediate combine may leave values to be + * finalized by another executor node. * * 'aggtype' and 'aggoutputtype' are the same except when we're performing * partal aggregation; in that case, we output transition states. Nothing