Class IcebergArrowColumnVector
- java.lang.Object
-
- org.apache.spark.sql.vectorized.ColumnVector
-
- org.apache.iceberg.spark.data.vectorized.IcebergArrowColumnVector
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
ColumnVectorWithFilter
public class IcebergArrowColumnVector extends org.apache.spark.sql.vectorized.ColumnVector
Implementation of Spark'sColumnVector
interface. The code for this class is heavily inspired from Spark'sArrowColumnVector
The main difference is in how nullability checks are made in this class by relying onNullabilityHolder
instead of the validity vector in the Arrow vector.
-
-
Constructor Summary
Constructors Constructor Description IcebergArrowColumnVector(VectorHolder holder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ArrowVectorAccessor<org.apache.spark.sql.types.Decimal,org.apache.spark.unsafe.types.UTF8String,org.apache.spark.sql.vectorized.ColumnarArray,org.apache.spark.sql.vectorized.ArrowColumnVector>
accessor()
void
close()
org.apache.spark.sql.vectorized.ColumnarArray
getArray(int rowId)
byte[]
getBinary(int rowId)
boolean
getBoolean(int rowId)
byte
getByte(int rowId)
org.apache.spark.sql.vectorized.ArrowColumnVector
getChild(int ordinal)
org.apache.spark.sql.types.Decimal
getDecimal(int rowId, int precision, int scale)
double
getDouble(int rowId)
float
getFloat(int rowId)
int
getInt(int rowId)
long
getLong(int rowId)
org.apache.spark.sql.vectorized.ColumnarMap
getMap(int rowId)
short
getShort(int rowId)
org.apache.spark.unsafe.types.UTF8String
getUTF8String(int rowId)
boolean
hasNull()
boolean
isNullAt(int rowId)
protected NullabilityHolder
nullabilityHolder()
int
numNulls()
ArrowVectorAccessor<org.apache.spark.sql.types.Decimal,org.apache.spark.unsafe.types.UTF8String,org.apache.spark.sql.vectorized.ColumnarArray,org.apache.spark.sql.vectorized.ArrowColumnVector>
vectorAccessor()
-
-
-
Constructor Detail
-
IcebergArrowColumnVector
public IcebergArrowColumnVector(VectorHolder holder)
-
-
Method Detail
-
accessor
protected ArrowVectorAccessor<org.apache.spark.sql.types.Decimal,org.apache.spark.unsafe.types.UTF8String,org.apache.spark.sql.vectorized.ColumnarArray,org.apache.spark.sql.vectorized.ArrowColumnVector> accessor()
-
nullabilityHolder
protected NullabilityHolder nullabilityHolder()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in classorg.apache.spark.sql.vectorized.ColumnVector
-
hasNull
public boolean hasNull()
- Specified by:
hasNull
in classorg.apache.spark.sql.vectorized.ColumnVector
-
numNulls
public int numNulls()
- Specified by:
numNulls
in classorg.apache.spark.sql.vectorized.ColumnVector
-
isNullAt
public boolean isNullAt(int rowId)
- Specified by:
isNullAt
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getBoolean
public boolean getBoolean(int rowId)
- Specified by:
getBoolean
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getByte
public byte getByte(int rowId)
- Specified by:
getByte
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getShort
public short getShort(int rowId)
- Specified by:
getShort
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getInt
public int getInt(int rowId)
- Specified by:
getInt
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getLong
public long getLong(int rowId)
- Specified by:
getLong
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getFloat
public float getFloat(int rowId)
- Specified by:
getFloat
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getDouble
public double getDouble(int rowId)
- Specified by:
getDouble
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getArray
public org.apache.spark.sql.vectorized.ColumnarArray getArray(int rowId)
- Specified by:
getArray
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getMap
public org.apache.spark.sql.vectorized.ColumnarMap getMap(int rowId)
- Specified by:
getMap
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getDecimal
public org.apache.spark.sql.types.Decimal getDecimal(int rowId, int precision, int scale)
- Specified by:
getDecimal
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getUTF8String
public org.apache.spark.unsafe.types.UTF8String getUTF8String(int rowId)
- Specified by:
getUTF8String
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getBinary
public byte[] getBinary(int rowId)
- Specified by:
getBinary
in classorg.apache.spark.sql.vectorized.ColumnVector
-
getChild
public org.apache.spark.sql.vectorized.ArrowColumnVector getChild(int ordinal)
- Specified by:
getChild
in classorg.apache.spark.sql.vectorized.ColumnVector
-
vectorAccessor
public ArrowVectorAccessor<org.apache.spark.sql.types.Decimal,org.apache.spark.unsafe.types.UTF8String,org.apache.spark.sql.vectorized.ColumnarArray,org.apache.spark.sql.vectorized.ArrowColumnVector> vectorAccessor()
-
-