public abstract class StrictAggImplementor extends Object implements AggImplementor
RexImpTable.CountImplementor,
RexImpTable.SumImplementor| Constructor and Description |
|---|
StrictAggImplementor() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
accAdvance(AggAddContext add,
org.apache.calcite.linq4j.tree.Expression acc,
org.apache.calcite.linq4j.tree.Expression next) |
List<Type> |
getNotNullState(AggContext info) |
protected int |
getStateSize() |
List<Type> |
getStateType(AggContext info)
Returns the types of the intermediate variables used by the aggregate
implementation.
|
void |
implementAdd(AggContext info,
AggAddContext add)
Updates intermediate values to account for the newly added value.
|
protected abstract void |
implementNotNullAdd(AggContext info,
AggAddContext add) |
protected void |
implementNotNullReset(AggContext info,
AggResetContext reset) |
protected org.apache.calcite.linq4j.tree.Expression |
implementNotNullResult(AggContext info,
AggResultContext result) |
void |
implementReset(AggContext info,
AggResetContext reset)
Implements reset of the intermediate variables to the initial state.
|
org.apache.calcite.linq4j.tree.Expression |
implementResult(AggContext info,
AggResultContext result)
Calculates the resulting value based on the intermediate variables.
|
protected boolean |
nonDefaultOnEmptySet(AggContext info) |
protected boolean nonDefaultOnEmptySet(AggContext info)
protected final int getStateSize()
protected static void accAdvance(AggAddContext add, org.apache.calcite.linq4j.tree.Expression acc, org.apache.calcite.linq4j.tree.Expression next)
public final List<Type> getStateType(AggContext info)
AggImplementorFor instance, for "concatenate to string" this can be
StringBuilder.
Calcite calls this method before all other implement* methods.
getStateType in interface AggImplementorinfo - Aggregate contextpublic List<Type> getNotNullState(AggContext info)
public final void implementReset(AggContext info, AggResetContext reset)
AggImplementorAggResetContext.accumulator() should be used to reference
the state variables.
For instance, to zero the count, use the following code:
reset.currentBlock().add(
Expressions.statement(
Expressions.assign(reset.accumulator().get(0),
Expressions.constant(0)));implementReset in interface AggImplementorinfo - Aggregate contextreset - Reset contextprotected void implementNotNullReset(AggContext info, AggResetContext reset)
public final void implementAdd(AggContext info, AggAddContext add)
AggImplementorAggResetContext.accumulator() should be used to reference
the state variables.implementAdd in interface AggImplementorinfo - Aggregate contextadd - Add contextprotected abstract void implementNotNullAdd(AggContext info, AggAddContext add)
public final org.apache.calcite.linq4j.tree.Expression implementResult(AggContext info, AggResultContext result)
AggImplementorAggResetContext.accumulator() should be used to reference
the state variables.implementResult in interface AggImplementorinfo - Aggregate contextresult - Result contextprotected org.apache.calcite.linq4j.tree.Expression implementNotNullResult(AggContext info, AggResultContext result)
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.