Module org.elasticsearch.compute
Class IntArrowBufBlock
java.lang.Object
org.elasticsearch.compute.data.AbstractNonThreadSafeRefCounted
org.elasticsearch.compute.data.arrow.AbstractArrowBufBlock<IntVector,IntBlock>
org.elasticsearch.compute.data.arrow.IntArrowBufBlock
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.util.Accountable,Writeable,Block,IntBlock,RefCounted,Releasable,BlockLoader.Block
public final class IntArrowBufBlock
extends AbstractArrowBufBlock<IntVector,IntBlock>
implements IntBlock
Implementation of IntBlock backed by an Arrow buffer holding 32 bits signed integers.
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.IntBlock
IntBlock.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
ConstructorsConstructorDescriptionIntArrowBufBlock(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<IntBlock> protected intbyteSize()Returns the element type of this block.intgetInt(int valueIndex) Retrieves the int value stored at the given value index.static IntBlockof(org.apache.arrow.vector.ValueVector arrowVector, BlockFactory blockFactory) intThe maximum size in bytes of any single value stored in this block, or0if there are no values.protected ArrowBufVectorConstructor<IntVector> 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
attachReleasable, 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, attachReleasable, blockFactory, doesHaveMultivaluedFields, getFirstValueIndex, getPositionCount, getTotalValueCount, getValueCount, insertNulls, isNull, isReleased, mayHaveMultivaluedFields, mayHaveNulls, mvDeduplicated, mvOrdering, mvSortedAscendingMethods inherited from interface org.elasticsearch.compute.data.IntBlock
asVector, deepCopy, equals, expand, filter, 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
-
IntArrowBufBlock
public IntArrowBufBlock(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 IntBlock of(org.apache.arrow.vector.ValueVector arrowVector, BlockFactory blockFactory) -
byteSize
protected int byteSize()- Specified by:
byteSizein classAbstractArrowBufBlock<IntVector,IntBlock>
-
valueMaxByteSize
public int valueMaxByteSize()Description copied from interface:IntBlockThe maximum size in bytes of any single value stored in this block, or0if there are no values. AlwaysInteger.BYTESsince all int values encode to the same number of bytes.- Specified by:
valueMaxByteSizein interfaceBlock- Specified by:
valueMaxByteSizein interfaceIntBlock- Returns:
- the maximum byte size of any single value in this block
-
vectorConstructor
- Specified by:
vectorConstructorin classAbstractArrowBufBlock<IntVector,IntBlock>
-
blockConstructor
- Specified by:
blockConstructorin classAbstractArrowBufBlock<IntVector,IntBlock>
-
getInt
public int getInt(int valueIndex) Description copied from interface:IntBlockRetrieves the int value stored at the given value index.The
valueIndexfor a position is between.int start = getFirstValueIndex(position); int end = start + getValueCount(position); -
elementType
Description copied from interface:BlockReturns the element type of this block.- Specified by:
elementTypein interfaceBlock- Returns:
- the element type of this block
-