Module org.elasticsearch.compute
Package org.elasticsearch.compute.data
Interface ExponentialHistogramBlock
- All Superinterfaces:
org.apache.lucene.util.Accountable,AutoCloseable,Block,BlockLoader.Block,Closeable,HistogramBlock,org.elasticsearch.core.RefCounted,org.elasticsearch.core.Releasable,Writeable
- All Known Implementing Classes:
ConstantNullBlock
public sealed interface ExponentialHistogramBlock
extends HistogramBlock
permits ConstantNullBlock (not exhaustive)
A block that holds
ExponentialHistogram values.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder forExponentialHistogramBlockstatic interfaceAbstraction to use for reading individual serialized viaExponentialHistogramBlockBuilder.deserializeAndAppend(SerializedInput).static interfaceAbstraction to use for writing individual values viaserializeExponentialHistogram(int, SerializedOutput, BytesRef).Nested classes/interfaces inherited from interface org.elasticsearch.compute.data.Block
Block.MvOrderingNested classes/interfaces inherited from interface org.elasticsearch.compute.data.HistogramBlock
HistogramBlock.ComponentNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLEFields inherited from interface org.elasticsearch.compute.data.Block
ESQL_AGGREGATE_METRIC_DOUBLE_BLOCK, MAX_LOOKUP, PAGE_MEM_OVERHEAD_PER_BLOCK, SERIALIZE_BLOCK_ARRAY, SERIALIZE_BLOCK_BIG_ARRAY, SERIALIZE_BLOCK_ORDINAL, SERIALIZE_BLOCK_VALUES, SERIALIZE_BLOCK_VECTORFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanequals(ExponentialHistogramBlock blockA, ExponentialHistogramBlock blockB) getExponentialHistogram(int valueIndex, ExponentialHistogramScratch scratch) Returns theExponentialHistogramvalue at the given index.voidserializeExponentialHistogram(int valueIndex, ExponentialHistogramBlock.SerializedOutput out, org.apache.lucene.util.BytesRef scratch) Serializes the exponential histogram at the given index into the provided output, so that it can be read back viaExponentialHistogramBlockBuilder.deserializeAndAppend(SerializedInput).Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources, ramBytesUsedMethods inherited from interface org.elasticsearch.compute.data.Block
allowPassingToDifferentDriver, areAllValuesNull, asVector, blockFactory, deepCopy, doesHaveMultivaluedFields, elementType, expand, filter, getFirstValueIndex, getPositionCount, getTotalValueCount, getValueCount, insertNulls, isNull, isReleased, keepMask, lookup, mayHaveMultivaluedFields, mayHaveNulls, mvDeduplicated, mvOrdering, mvSortedAscending, writeToMethods inherited from interface org.elasticsearch.compute.data.HistogramBlock
buildHistogramComponentBlockMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
getExponentialHistogram
Returns theExponentialHistogramvalue at the given index. In order to be allocation free, this method requires a scratch object to be passed in, whose memory will be used to hold the state of the returned histogram. Therefore, the return value of this method is only valid until either the block is closed or the same scratch instance is passed to another call to this method on any block.- Parameters:
valueIndex- the index of the histogram to getscratch- the scratch to use as storage for the returned histogram- Returns:
- the exponential histogram at the given index
-
serializeExponentialHistogram
void serializeExponentialHistogram(int valueIndex, ExponentialHistogramBlock.SerializedOutput out, org.apache.lucene.util.BytesRef scratch) Serializes the exponential histogram at the given index into the provided output, so that it can be read back viaExponentialHistogramBlockBuilder.deserializeAndAppend(SerializedInput).- Parameters:
valueIndex-out-scratch-
-
equals
-