Module org.elasticsearch.compute
Class FloatArrowBufBlock
java.lang.Object
org.elasticsearch.compute.data.AbstractNonThreadSafeRefCounted
org.elasticsearch.compute.data.arrow.AbstractArrowBufBlock<FloatVector,FloatBlock>
org.elasticsearch.compute.data.arrow.FloatArrowBufBlock
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.util.Accountable,Writeable,Block,FloatBlock,org.elasticsearch.core.RefCounted,org.elasticsearch.core.Releasable,BlockLoader.Block
public final class FloatArrowBufBlock
extends AbstractArrowBufBlock<FloatVector,FloatBlock>
implements FloatBlock
Implementation of FloatBlock backed by an Arrow buffer holding 32 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.FloatBlock
FloatBlock.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
ConstructorsConstructorDescriptionFloatArrowBufBlock(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<FloatBlock> protected intbyteSize()Returns the element type of this block.floatgetFloat(int valueIndex) Retrieves the float value stored at the given value index.static FloatArrowBufBlockof(org.apache.arrow.vector.ValueVector arrowVector, BlockFactory blockFactory) protected ArrowBufVectorConstructor<FloatVector> 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.FloatBlock
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
-
FloatArrowBufBlock
public FloatArrowBufBlock(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 FloatArrowBufBlock of(org.apache.arrow.vector.ValueVector arrowVector, BlockFactory blockFactory) -
byteSize
protected int byteSize()- Specified by:
byteSizein classAbstractArrowBufBlock<FloatVector,FloatBlock>
-
vectorConstructor
- Specified by:
vectorConstructorin classAbstractArrowBufBlock<FloatVector,FloatBlock>
-
blockConstructor
- Specified by:
blockConstructorin classAbstractArrowBufBlock<FloatVector,FloatBlock>
-
getFloat
public float getFloat(int valueIndex) Description copied from interface:FloatBlockRetrieves the float 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:
getFloatin interfaceFloatBlock- Parameters:
valueIndex- the value index- Returns:
- the data value (as a float)
-
elementType
Description copied from interface:BlockReturns the element type of this block.- Specified by:
elementTypein interfaceBlock- Returns:
- the element type of this block
-