Module org.elasticsearch.compute
Class SharedNumericThreshold
java.lang.Object
org.elasticsearch.core.AbstractRefCounted
org.elasticsearch.compute.operator.SideChannel
org.elasticsearch.compute.operator.topn.SharedNumericThreshold
- All Implemented Interfaces:
Closeable,AutoCloseable,RefCounted,Releasable
Thread-safe, shared numeric TopN threshold for operators running on the same node.
Each NumericTopNOperator publishes the raw value at the top of its full heap. The
accumulated value is monotonic: ascending sorts keep the smallest observed heap top and
descending sorts keep the largest observed heap top. Readers can use that threshold to skip
row groups or stripes whose min/max statistics prove they cannot contain a globally
competitive row.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.compute.operator.SideChannel
SideChannel.Status -
Field Summary
Fields inherited from class org.elasticsearch.core.AbstractRefCounted
ALREADY_CLOSED_MESSAGE, INVALID_DECREF_MESSAGEFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Method Summary
Modifier and TypeMethodDescriptionprotected voidlongcurrent()booleandominates(long rangeMin, long rangeMax) Whether a min/max statistics range is strictly dominated by the current threshold.voidMark the source as exhausted by K nulls under NULLS FIRST and collapse the threshold to a value that dominates every ordinary min/max range.booleanvoidoffer(long rawTopOfHeap) Publish a raw heap-top value.longMethods inherited from class org.elasticsearch.compute.operator.SideChannel
close, closeInternalMethods inherited from class org.elasticsearch.core.AbstractRefCounted
alreadyClosed, decRef, hasReferences, incRef, mustIncRef, of, refCount, touch, tryIncRef
-
Method Details
-
offer
public void offer(long rawTopOfHeap) Publish a raw heap-top value. The accumulator only tightens, never relaxes. -
current
public long current() -
dominates
public boolean dominates(long rangeMin, long rangeMax) Whether a min/max statistics range is strictly dominated by the current threshold. Equality is deliberately not skipped because row-position tiebreakers can still matter. -
markNoFurtherCandidates
public void markNoFurtherCandidates()Mark the source as exhausted by K nulls under NULLS FIRST and collapse the threshold to a value that dominates every ordinary min/max range. -
noFurtherCandidates
public boolean noFurtherCandidates() -
offeredCount
public long offeredCount() -
closeSideChannel
protected void closeSideChannel()- Specified by:
closeSideChannelin classSideChannel
-