Class JsonVector
java.lang.Object
org.apache.arrow.vector.BaseValueVector
org.apache.arrow.vector.ExtensionTypeVector<FieldVector>
org.apache.arrow.vector.extension.JsonVector
- All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<ValueVector>, FieldVector, ValueIterableVector<Text>, ValueVector
public class JsonVector
extends ExtensionTypeVector<FieldVector>
implements ValueIterableVector<Text>
A JSON extension vector backed by a string vector.
Use Field.createVector(BufferAllocator) with a JsonType field to create an
instance. Write UTF-8 JSON through ExtensionTypeVector.getUnderlyingVector(); values are not parsed or
validated.
-
Field Summary
Fields inherited from class BaseValueVector
allocator, fieldReader, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, validityBuffer, valueCount -
Method Summary
Modifier and TypeMethodDescriptiongetField()Get information about how this field is materialized.getObject(int index) Get the extension object at the specified index.getTransferPair(String name, BufferAllocator allocator) To transfer quota responsibility.getTransferPair(String name, BufferAllocator allocator, CallBack callBack) To transfer quota responsibility.getTransferPair(BufferAllocator allocator) To transfer quota responsibility.getTransferPair(Field targetField, BufferAllocator allocator) To transfer quota responsibility.getTransferPair(Field targetField, BufferAllocator allocator, CallBack callBack) To transfer quota responsibility.inthashCode(int index) Returns hashCode of element in index with the default hasher.inthashCode(int index, ArrowBufHasher hasher) Returns hashCode of element in index with the given hasher.makeTransferPair(ValueVector target) Makes a new transfer pair used to transfer underlying buffers.Methods inherited from class ExtensionTypeVector
accept, allocateNew, allocateNewSafe, clear, close, exportCDataBuffers, getAllocator, getBuffers, getBufferSize, getBufferSizeFor, getChildrenFromFields, getDataBuffer, getDataBufferAddress, getExportedCDataBufferCount, getFieldBuffers, getFieldInnerVectors, getMinorType, getName, getNullCount, getOffsetBuffer, getOffsetBufferAddress, getReaderImpl, getStorageVector, getUnderlyingVector, getValidityBuffer, getValidityBufferAddress, getValueCapacity, getValueCount, initializeChildrenFromFields, isNull, iterator, loadFieldBuffers, reAlloc, reset, setInitialCapacity, setNull, setValueCountMethods inherited from class BaseValueVector
allocateValidityBuffer, checkBufRefs, copyFrom, copyFromSafe, copyValidityBuffer, getReader, getValidityBufferSizeFromCount, releaseBuffer, sliceAndTransferValidityBuffer, splitAndTransferValidityBuffer, toString, transferBufferMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FieldVector
exportBufferMethods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface ValueIterableVector
getValueIterable, getValueIteratorMethods inherited from interface ValueVector
accept, allocateNew, allocateNewSafe, clear, close, copyFrom, copyFromSafe, getAllocator, getBuffers, getBufferSize, getBufferSizeFor, getDataBuffer, getMinorType, getName, getNullCount, getOffsetBuffer, getReader, getValidityBuffer, getValueCapacity, getValueCount, isNull, reAlloc, reset, setInitialCapacity, setValueCount, validate, validateFull
-
Method Details
-
getField
Description copied from interface:ValueVectorGet information about how this field is materialized.- Specified by:
getFieldin interfaceValueVector- Overrides:
getFieldin classExtensionTypeVector<FieldVector>- Returns:
- the field corresponding to this vector
-
getObject
Description copied from class:ExtensionTypeVectorGet the extension object at the specified index.Generally, this should access the underlying vector and construct the corresponding Java object from the raw data.
- Specified by:
getObjectin interfaceValueVector- Specified by:
getObjectin classExtensionTypeVector<FieldVector>- Parameters:
index- index of object to get- Returns:
- friendly type object, null if value is unset
-
getTransferPair
Description copied from interface:ValueVectorTo transfer quota responsibility.- Specified by:
getTransferPairin interfaceValueVector- Overrides:
getTransferPairin classExtensionTypeVector<FieldVector>- Parameters:
allocator- the target allocator- Returns:
- a
transfer pair, creating a new target vector of the same type.
-
getTransferPair
Description copied from interface:ValueVectorTo transfer quota responsibility.- Specified by:
getTransferPairin interfaceValueVector- Overrides:
getTransferPairin classExtensionTypeVector<FieldVector>- Parameters:
name- the name of the vectorallocator- the target allocator- Returns:
- a
transfer pair, creating a new target vector of the same type.
-
getTransferPair
Description copied from interface:ValueVectorTo transfer quota responsibility.- Specified by:
getTransferPairin interfaceValueVector- Overrides:
getTransferPairin classExtensionTypeVector<FieldVector>- Parameters:
name- the name of the vectorallocator- the target allocatorcallBack- A schema change callback.- Returns:
- a
transfer pair, creating a new target vector of the same type.
-
getTransferPair
Description copied from interface:ValueVectorTo transfer quota responsibility.- Specified by:
getTransferPairin interfaceValueVector- Overrides:
getTransferPairin classExtensionTypeVector<FieldVector>- Parameters:
targetField- the Field object used by the target vectorallocator- the target allocator- Returns:
- a
transfer pair, creating a new target vector of the same type.
-
getTransferPair
public TransferPair getTransferPair(Field targetField, BufferAllocator allocator, CallBack callBack) Description copied from interface:ValueVectorTo transfer quota responsibility.- Specified by:
getTransferPairin interfaceValueVector- Overrides:
getTransferPairin classExtensionTypeVector<FieldVector>- Parameters:
targetField- the Field object used by the target vectorallocator- the target allocatorcallBack- A schema change callback.- Returns:
- a
transfer pair, creating a new target vector of the same type.
-
makeTransferPair
Description copied from interface:ValueVectorMakes a new transfer pair used to transfer underlying buffers.- Specified by:
makeTransferPairin interfaceValueVector- Overrides:
makeTransferPairin classExtensionTypeVector<FieldVector>- Parameters:
target- the target for the transfer- Returns:
- a new
transfer pairthat is used to transfer underlying buffers into the target vector.
-
hashCode
public int hashCode(int index) Description copied from interface:ValueVectorReturns hashCode of element in index with the default hasher.- Specified by:
hashCodein interfaceValueVector
-
hashCode
Description copied from interface:ValueVectorReturns hashCode of element in index with the given hasher.- Specified by:
hashCodein interfaceValueVector
-