Average implements AggregatingFunction, FrameAccumulating, WindowFunction uses ResolvesFromChildren
FinalYes
Interfaces
- AggregatingFunction
- FrameAccumulating
- Opts a WindowFunction into incremental frame evaluation. Carrying it asserts the result depends only on the frame contents - never on the current row or its index - which is what lets WindowProcessor reuse a value across rows that share frame bounds.
- WindowFunction
Methods
- __construct() : mixed
- accumulator() : FrameAccumulator
- aggregate() : void
- apply() : mixed
- children() : array<int, FunctionTree>
- Every operand of this node that is an expression, in constructor order.
- outputName() : string
- Decided in the constructor, never mutated.
- over() : static
- Returns a copy bound to $window. Never mutates $this.
- references() : array<int, Reference>
- resolved() : bool
- returns() : Type<string|int, mixed>
- An OptionalType return declares the produced column nullable; there is no nullable() peer.
- toString() : string
- value() : null|array<string|int, mixed>|bool|float|int|object|string
- window() : Window
- withChildren() : static
- A copy of this node with $children in place of children(): same count, same order, same per-element narrowing. Never mutates $this.
Methods
__construct()
public
__construct(Reference $ref[, int $scale = 2 ][, Rounding $rounding = Rounding::HALF_UP ][, Window|null $window = null ]) : mixed
Parameters
- $ref : Reference
- $scale : int = 2
- $rounding : Rounding = Rounding::HALF_UP
- $window : Window|null = null
accumulator()
public
accumulator(FlowContext $context) : FrameAccumulator
Parameters
- $context : FlowContext
Return values
FrameAccumulatoraggregate()
public
aggregate(Row $row, FlowContext $context) : void
Parameters
- $row : Row
- $context : FlowContext
apply()
public
apply(WindowContext $window) : mixed
Parameters
- $window : WindowContext
children()
Every operand of this node that is an expression, in constructor order.
public
children() : array<int, FunctionTree>
Return values
array<int, FunctionTree>outputName()
Decided in the constructor, never mutated.
public
outputName() : string
Return values
stringover()
Returns a copy bound to $window. Never mutates $this.
public
over(Window $window) : static
Parameters
- $window : Window
Return values
staticreferences()
public
references() : array<int, Reference>
Return values
array<int, Reference>resolved()
public
resolved() : bool
Return values
boolreturns()
An OptionalType return declares the produced column nullable; there is no nullable() peer.
public
returns() : Type<string|int, mixed>
Return values
Type<string|int, mixed>toString()
public
toString() : string
Return values
stringvalue()
public
value() : null|array<string|int, mixed>|bool|float|int|object|string
Return values
null|array<string|int, mixed>|bool|float|int|object|stringwindow()
public
window() : Window
Return values
WindowwithChildren()
A copy of this node with $children in place of children(): same count, same order, same per-element narrowing. Never mutates $this.
public
withChildren(array<int, FunctionTree> $children) : static
Parameters
- $children : array<int, FunctionTree>