Module org.elasticsearch.compute
Class Float16ArrowBufBlock
java.lang.Object
org.elasticsearch.compute.data.AbstractNonThreadSafeRefCounted
org.elasticsearch.compute.data.arrow.AbstractArrowBufBlock<DoubleVector,DoubleBlock>
org.elasticsearch.compute.data.arrow.Float16ArrowBufBlock
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.util.Accountable,Writeable,Block,DoubleBlock,org.elasticsearch.core.RefCounted,org.elasticsearch.core.Releasable,BlockLoader.Block
public final class Float16ArrowBufBlock
extends AbstractArrowBufBlock<DoubleVector,DoubleBlock>
implements DoubleBlock
Implementation of DoubleBlock backed by an Arrow buffer holding 16 bits floats.
This class is generated. Edit X-ArrowBufBlock.java.st instead.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.compute.data.Block
Block.Builder, Block.MvOrderingNested classes/interfaces inherited from interface org.elasticsearch.compute.data.DoubleBlock
DoubleBlock.BuilderNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.compute.data.arrow.AbstractArrowBufBlock
blockFactory, closed, offsetBuffer, offsetCount, validityBuffer, valueBuffer, valueCountFields 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 -
Constructor Summary
ConstructorsConstructorDescriptionFloat16ArrowBufBlock(org.apache.arrow.memory.ArrowBuf valueBuffer, org.apache.arrow.memory.ArrowBuf validityBuffer, org.apache.arrow.memory.ArrowBuf offsetBuffer, int valueCount, int offsetCount, BlockFactory blockFactory) Create an ArrowBuf block based on the constituents of an ArrowValueVector. -
Method Summary
Modifier and TypeMethodDescriptionprotected ArrowBufBlockConstructor<DoubleBlock> protected intbyteSize()Returns the element type of this block.doublegetDouble(int valueIndex) Retrieves the double value stored at the given value index.static Float16ArrowBufBlockof(org.apache.arrow.vector.ValueVector arrowVector, BlockFactory blockFactory) protected ArrowBufVectorConstructor<DoubleVector> Methods inherited from class org.elasticsearch.compute.data.arrow.AbstractArrowBufBlock
allowPassingToDifferentDriver, areAllValuesNull, asVector, blockFactory, closeInternal, doesHaveMultivaluedFields, expand, filter, getFirstValueIndex, getPositionCount, getTotalValueCount, getValueCount, isNull, keepMask, lookup, mayHaveMultivaluedFields, mayHaveNulls, mvOrdering, ramBytesUsed, releaseBuffers, retainBuffers, setValidityBit, validityBufferLengthMethods inherited from class org.elasticsearch.compute.data.AbstractNonThreadSafeRefCounted
close, decRef, hasReferences, incRef, isReleased, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources, ramBytesUsedMethods inherited from interface org.elasticsearch.compute.data.Block
allowPassingToDifferentDriver, areAllValuesNull, blockFactory, doesHaveMultivaluedFields, getFirstValueIndex, getPositionCount, getTotalValueCount, getValueCount, insertNulls, isNull, isReleased, mayHaveMultivaluedFields, mayHaveNulls, mvDeduplicated, mvOrdering, mvSortedAscendingMethods inherited from interface org.elasticsearch.compute.data.DoubleBlock
asVector, deepCopy, equals, expand, filter, hashCode, hasValue, keepMask, lookup, slice, writeToMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.core.Releasable
close
-
Constructor Details
-
Float16ArrowBufBlock
public Float16ArrowBufBlock(org.apache.arrow.memory.ArrowBuf valueBuffer, @Nullable org.apache.arrow.memory.ArrowBuf validityBuffer, @Nullable org.apache.arrow.memory.ArrowBuf offsetBuffer, int valueCount, int offsetCount, BlockFactory blockFactory) Create an ArrowBuf block based on the constituents of an ArrowValueVector. The caller must retain the buffers if they are shared with other blocks or Arrow vectors.
-
-
Method Details
-
of
public static Float16ArrowBufBlock of(org.apache.arrow.vector.ValueVector arrowVector, BlockFactory blockFactory) -
byteSize
protected int byteSize()- Specified by:
byteSizein classAbstractArrowBufBlock<DoubleVector,DoubleBlock>
-
vectorConstructor
- Specified by:
vectorConstructorin classAbstractArrowBufBlock<DoubleVector,DoubleBlock>
-
blockConstructor
- Specified by:
blockConstructorin classAbstractArrowBufBlock<DoubleVector,DoubleBlock>
-
getDouble
public double getDouble(int valueIndex) Description copied from interface:DoubleBlockRetrieves the double value stored at the given value index.Values for a given position are between getFirstValueIndex(position) (inclusive) and getFirstValueIndex(position) + getValueCount(position) (exclusive).
- Specified by:
getDoublein interfaceDoubleBlock- Parameters:
valueIndex- the value index- Returns:
- the data value (as a double)
-
elementType
Description copied from interface:BlockReturns the element type of this block.- Specified by:
elementTypein interfaceBlock- Returns:
- the element type of this block
-