Module org.elasticsearch.compute
Class AddPage
java.lang.Object
org.elasticsearch.compute.aggregation.blockhash.AddPage
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.Releasable
- Direct Known Subclasses:
IntLongBlockAdd,LongLongBlockAdd
Helper for adding a
Page worth of Blocks to a BlockHash
while flushing the ordinals to the aggregations when we've accumulated
emitBatchSize ordinals. See appendOrdSv(int, int) and appendOrdInMv(int, int)
for how to add values to it. After adding all values, call emitOrds() to
flush the last batch of values to the aggs.-
Constructor Summary
ConstructorsConstructorDescriptionAddPage(BlockFactory blockFactory, int emitBatchSize, GroupingAggregatorFunction.AddInput addInput) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidappendNullSv(int position) Deprecated.nulls should resolve to some value.protected final voidappendOrdInMv(int position, int ord) Append a value inside a multivalued ordinal.protected final voidappendOrdSv(int position, int ord) Append a single valued ordinal.voidclose()protected final voidfinishMv()protected final voidCall when finished to emit all remaining ordinals to the aggs.
-
Constructor Details
-
AddPage
public AddPage(BlockFactory blockFactory, int emitBatchSize, GroupingAggregatorFunction.AddInput addInput)
-
-
Method Details
-
appendOrdSv
protected final void appendOrdSv(int position, int ord) Append a single valued ordinal. This will flush the ordinals to the aggs if we've addedemitBatchSize. -
appendNullSv
Deprecated.nulls should resolve to some value.Append anullvalued ordinal. This will flush the ordinals to the aggs if we've addedemitBatchSize. -
appendOrdInMv
protected final void appendOrdInMv(int position, int ord) Append a value inside a multivalued ordinal. If the current position is not started this will begin the position. This will flush the ordinals to the aggs if we've addedemitBatchSize.This should be used by like:appendOrdInMv(position, ord); appendOrdInMv(position, ord); appendOrdInMv(position, ord); finishMv(); -
finishMv
protected final void finishMv() -
flushRemaining
protected final void flushRemaining()Call when finished to emit all remaining ordinals to the aggs. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-