GroupByAggregationProcessor implements Distributable
Read onlyYes
FinalYes
Past the memory limit, the rest is bucketed by key hash and aggregated per bucket.
Interfaces
- Distributable
- Unlike a Transformer, receives the whole upstream generator, not one batch.
Properties
Methods
- __construct() : mixed
- bind() : BoundStep<string|int, Processor>
- breaks() : bool
- True when process() needs every input row before it emits one: the processor ends its pipeline.
- describe() : null|Description
- null when the random value generator or the grouping config does not describe.
- distribution() : Distribution|null
- Every split aggregates its rows into partials (PartialAggregate); the partials of one key are merged (MergedAggregate) in one process. null while unbound, for a pivot, or when it does not describe.
- fromDescription() : static
- process() : Generator<string|int, Rows>
- Process a stream of Rows and return a new stream.
- shape() : GroupByShape|null
- The bound shape; null while unbound.
- spilled() : Generator<string|int, Rows>
Properties
$config
public
BucketingConfig
$config
$groupBy
public
GroupBy
$groupBy
Methods
__construct()
public
__construct(GroupBy $groupBy, BucketingConfig $config, RandomValueGenerator $random[, GroupByShape|null $shape = null ]) : mixed
Parameters
- $groupBy : GroupBy
- $config : BucketingConfig
-
the effective grouping config: the operation's own or the frame's
- $random : RandomValueGenerator
- $shape : GroupByShape|null = null
bind()
public
bind(Schema $input) : BoundStep<string|int, Processor>
Parameters
- $input : Schema
Tags
Return values
BoundStep<string|int, Processor>breaks()
True when process() needs every input row before it emits one: the processor ends its pipeline.
public
breaks() : bool
Return values
booldescribe()
null when the random value generator or the grouping config does not describe.
public
describe() : null|Description
Return values
null|Description —null when this instance cannot cross a process boundary (a live client, a custom collaborator)
distribution()
Every split aggregates its rows into partials (PartialAggregate); the partials of one key are merged (MergedAggregate) in one process. null while unbound, for a pivot, or when it does not describe.
public
distribution() : Distribution|null
Tags
Return values
Distribution|nullfromDescription()
public
static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
- $data : array<string|int, mixed>
- $rebuild : Rebuild
Tags
Return values
staticprocess()
Process a stream of Rows and return a new stream.
public
process(Generator<string|int, Rows> $rows, Backend $backend) : Generator<string|int, Rows>
Parameters
Return values
Generator<string|int, Rows>shape()
The bound shape; null while unbound.
public
shape() : GroupByShape|null
Return values
GroupByShape|nullspilled()
public
spilled(AggregatedGroups $earlier, GroupByShape $shape, Generator<string|int, Rows> $rest, Buckets $buckets, Backend $backend) : Generator<string|int, Rows>
Parameters
- $earlier : AggregatedGroups
- $shape : GroupByShape
- $rest : Generator<string|int, Rows>
-
the stream after the batch that passed the limit
- $buckets : Buckets
- $backend : Backend