Module org.elasticsearch.compute
Class AbstractAllByKeyGroupingState
java.lang.Object
org.elasticsearch.compute.aggregation.AbstractArrayState
org.elasticsearch.compute.aggregation.AbstractAllByKeyGroupingState
- All Implemented Interfaces:
Closeable,AutoCloseable,GroupingAggregatorState,Releasable
- Direct Known Subclasses:
AbstractAllByIntGroupingState,AbstractAllByLongGroupingState
Base class for the grouping state of all "all first/last by key" aggregators.
Tracks the null-value and null-key flags per group.
Subclasses add the key array itself, typed to the key element type.
Whether a group has ever been collected is tracked via AbstractArrayState.hasValue(int) from
AbstractArrayState, driven by AbstractArrayState.trackGroupId(int) calls in
collectValue. The nullValue bit only distinguishes null values
from non-null values; it does not encode "never seen".
-
Field Summary
Fields inherited from class org.elasticsearch.compute.aggregation.AbstractArrayState
bigArrays -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidclearNullKey(int group) protected final voidclearNullValue(int group) voidclose()protected abstract voidgrow(int group) Called when a new group id is seen to grow subclass arrays to accommodategroup.protected final voidmarkNullKey(int group) protected final voidmarkNullValue(int group) protected final booleannullKey(int group) protected final booleannullValue(int group) Methods inherited from class org.elasticsearch.compute.aggregation.AbstractArrayState
enableGroupIdTracking, hasValue, toIntermediate, trackGroupId, trackingGroupIds
-
Constructor Details
-
AbstractAllByKeyGroupingState
-
-
Method Details
-
nullValue
protected final boolean nullValue(int group) -
markNullValue
protected final void markNullValue(int group) -
clearNullValue
protected final void clearNullValue(int group) -
nullKey
protected final boolean nullKey(int group) -
markNullKey
protected final void markNullKey(int group) -
clearNullKey
protected final void clearNullKey(int group) -
grow
protected abstract void grow(int group) Called when a new group id is seen to grow subclass arrays to accommodategroup. BothnullValueandnullKeyare lazyBitArrays that handle out-of-range indices safely, so no grow is needed in this base class. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable- Overrides:
closein classAbstractArrayState
-