Module org.elasticsearch.compute
Package org.elasticsearch.compute.data
Class ExponentialHistogramBlockBuilder
java.lang.Object
org.elasticsearch.compute.data.AbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilder<ExponentialHistogramBlock>
org.elasticsearch.compute.data.ExponentialHistogramBlockBuilder
- All Implemented Interfaces:
Closeable,AutoCloseable,Block.Builder,ExponentialHistogramBlock.Builder,Releasable,BlockLoader.Builder,BlockLoader.ExponentialHistogramBuilder
public final class ExponentialHistogramBlockBuilder
extends AbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilder<ExponentialHistogramBlock>
implements ExponentialHistogramBlock.Builder
-
Field Summary
Fields inherited from class org.elasticsearch.compute.data.AbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilder
blockFactory -
Method Summary
Modifier and TypeMethodDescriptionappend(int scale, BucketIterator negativeBuckets, BucketIterator positiveBuckets, double zeroThreshold, long zeroCount, long count, double sum, double min, double max) Append histogram components directly to the block builder.append(ExponentialHistogram histogram) Appends the provided histogram to this builder.Appends a null value to the block.copyFrom(ExponentialHistogramBlock block, int position) Copy the values inblockfrom the given positon into this builder.protected voidcopySubBlockPositions(AbstractDelegatingCompoundBlock<?> block, int startSubBlockPos, int endSubBlockPos) Copy the range of sub-block positions from the provided block into this builder.voidDecodes and appends a value serialized withExponentialHistogramBlock.serializeExponentialHistogram(int, ExponentialHistogramBlock.SerializedOutput, BytesRef).doBuild(int positionCount, int[] firstValueIndexes) longAn estimate of the number of bytes theBlockcreated byBlock.Builder.build()will use.protected voidCalled whenAbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilder.close()was invoked.maxima()minima()mvOrdering(Block.MvOrdering mvOrdering) How are multivalued fields ordered? This defaults toBlock.MvOrdering.UNORDEREDbut when you set it toBlock.MvOrdering.DEDUPLICATED_AND_SORTED_ASCENDINGsome operators can optimize themselves.sums()Methods inherited from class org.elasticsearch.compute.data.AbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilder
beginPositionEntry, build, close, copyFrom, endPositionEntry, isPositionEntryOpen, valueAppendedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.compute.data.Block.Builder
beginPositionEntry, copyFrom, endPositionEntryMethods inherited from interface org.elasticsearch.compute.data.ExponentialHistogramBlock.Builder
buildMethods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
minima
- Specified by:
minimain interfaceBlockLoader.ExponentialHistogramBuilder
-
maxima
- Specified by:
maximain interfaceBlockLoader.ExponentialHistogramBuilder
-
sums
- Specified by:
sumsin interfaceBlockLoader.ExponentialHistogramBuilder
-
valueCounts
- Specified by:
valueCountsin interfaceBlockLoader.ExponentialHistogramBuilder
-
zeroThresholds
- Specified by:
zeroThresholdsin interfaceBlockLoader.ExponentialHistogramBuilder
-
encodedHistograms
- Specified by:
encodedHistogramsin interfaceBlockLoader.ExponentialHistogramBuilder
-
append
Description copied from interface:ExponentialHistogramBlock.BuilderAppends the provided histogram to this builder.- Specified by:
appendin interfaceExponentialHistogramBlock.Builder
-
append
public ExponentialHistogramBlockBuilder append(int scale, BucketIterator negativeBuckets, BucketIterator positiveBuckets, double zeroThreshold, long zeroCount, long count, double sum, double min, double max) Append histogram components directly to the block builder. This bypasses materializing anExponentialHistograminstance and encodes buckets directly.- Specified by:
appendin interfaceExponentialHistogramBlock.Builder
-
deserializeAndAppend
Decodes and appends a value serialized withExponentialHistogramBlock.serializeExponentialHistogram(int, ExponentialHistogramBlock.SerializedOutput, BytesRef).- Parameters:
input- the input to deserialize from
-
doBuild
- Specified by:
doBuildin classAbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilder<ExponentialHistogramBlock>
-
copySubBlockPositions
protected void copySubBlockPositions(AbstractDelegatingCompoundBlock<?> block, int startSubBlockPos, int endSubBlockPos) Description copied from class:AbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilderCopy the range of sub-block positions from the provided block into this builder. -
appendNull
Description copied from interface:Block.BuilderAppends a null value to the block.- Specified by:
appendNullin interfaceBlock.Builder- Specified by:
appendNullin interfaceBlockLoader.Builder
-
copyFrom
Description copied from interface:ExponentialHistogramBlock.BuilderCopy the values inblockfrom the given positon into this builder.- Specified by:
copyFromin interfaceExponentialHistogramBlock.Builder
-
mvOrdering
Description copied from interface:Block.BuilderHow are multivalued fields ordered? This defaults toBlock.MvOrdering.UNORDEREDbut when you set it toBlock.MvOrdering.DEDUPLICATED_AND_SORTED_ASCENDINGsome operators can optimize themselves. This is a promise that is never checked. If you set this to anything other thanBlock.MvOrdering.UNORDEREDbe sure the values are in that order or other operators will make mistakes. The actual ordering isn't checked at runtime.- Specified by:
mvOrderingin interfaceBlock.Builder
-
estimatedBytes
public long estimatedBytes()Description copied from interface:Block.BuilderAn estimate of the number of bytes theBlockcreated byBlock.Builder.build()will use. This may overestimate the size but shouldn't underestimate it.- Specified by:
estimatedBytesin interfaceBlock.Builder- Overrides:
estimatedBytesin classAbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilder<ExponentialHistogramBlock>
-
extraClose
protected void extraClose()Description copied from class:AbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilderCalled whenAbstractDelegatingCompoundBlock.AbstractCompositeBlockBuilder.close()was invoked.
-