All Implemented Interfaces:
NamedWriteable, Writeable, PostAnalysisPlanVerificationAware, Resolvable, ToAggregator

public class ToPartial extends AggregateFunction implements ToAggregator
An internal aggregate function that always emits intermediate (or partial) output regardless of the aggregate mode. The intermediate output should be consumed by FromPartial, which always receives the intermediate input. Since an intermediate aggregate output can consist of multiple blocks, we wrap these output blocks in a single composite block. The FromPartial then unwraps this input block into multiple primitive blocks and passes them to the delegating GroupingAggregatorFunction.

Both of these commands yield the same result, except the second plan executes aggregates twice:

 ```
 | ... before
 | af(x) BY g
 | ... after
 ```
 ```
 | ... before
 | $x = to_partial(af(x)) BY g
 | from_partial($x, af(_)) BY g
 | ...  after
 
```
See Also: