Class GenericArrowVectorAccessorFactory<DecimalT,Utf8StringT,ArrayT,ChildVectorT extends AutoCloseable>
java.lang.Object
org.apache.iceberg.arrow.vectorized.GenericArrowVectorAccessorFactory<DecimalT,Utf8StringT,ArrayT,ChildVectorT>
- Type Parameters:
DecimalT
- A concrete type that can represent a decimal.Utf8StringT
- A concrete type that can represent a UTF8 string.ArrayT
- A concrete type that can represent an array value in a list vector, e.g. Spark's ColumnarArray.ChildVectorT
- A concrete type that can represent a child vector in a struct, e.g. Spark's ArrowColumnVector.
public class GenericArrowVectorAccessorFactory<DecimalT,Utf8StringT,ArrayT,ChildVectorT extends AutoCloseable>
extends Object
This class is creates typed
ArrowVectorAccessor
from VectorHolder
. It provides a
generic implementation for following Arrow types:
- Decimal type can be deserialized to a type that supports decimal, e.g. BigDecimal or Spark's Decimal.
- UTF8 String type can deserialized to a Java String or Spark's UTF8String.
- List type: the child elements of a list can be deserialized to Spark's ColumnarArray or similar type.
- Struct type: the child elements of a struct can be deserialized to a Spark's ArrowColumnVector or similar type.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
Create an array value of typeArrayT
from arrow vector value.protected static interface
Create a decimal value of typeDecimalT
from arrow vector value.protected static interface
Create a UTF8 String value of typeUtf8StringT
from arrow vector value.protected static interface
Create a struct child vector of typeChildVectorT
from arrow vector value. -
Constructor Summary
ModifierConstructorDescriptionprotected
GenericArrowVectorAccessorFactory
(Supplier<GenericArrowVectorAccessorFactory.DecimalFactory<DecimalT>> decimalFactorySupplier, Supplier<GenericArrowVectorAccessorFactory.StringFactory<Utf8StringT>> stringFactorySupplier, Supplier<GenericArrowVectorAccessorFactory.StructChildFactory<ChildVectorT>> structChildFactorySupplier, Supplier<GenericArrowVectorAccessorFactory.ArrayFactory<ChildVectorT, ArrayT>> arrayFactorySupplier) The constructor is parameterized using the decimal, string, struct and array factories. -
Method Summary
-
Constructor Details
-
GenericArrowVectorAccessorFactory
protected GenericArrowVectorAccessorFactory(Supplier<GenericArrowVectorAccessorFactory.DecimalFactory<DecimalT>> decimalFactorySupplier, Supplier<GenericArrowVectorAccessorFactory.StringFactory<Utf8StringT>> stringFactorySupplier, Supplier<GenericArrowVectorAccessorFactory.StructChildFactory<ChildVectorT>> structChildFactorySupplier, Supplier<GenericArrowVectorAccessorFactory.ArrayFactory<ChildVectorT, ArrayT>> arrayFactorySupplier) The constructor is parameterized using the decimal, string, struct and array factories. If a specific type is not supported, the factory supplier can raise anUnsupportedOperationException
.
-
-
Method Details
-
getVectorAccessor
public ArrowVectorAccessor<DecimalT,Utf8StringT, getVectorAccessorArrayT, ChildVectorT> (VectorHolder holder)
-