@InterfaceStability.Evolving public final class ArrowColumnVector extends ColumnVector
Constructor and Description |
---|
ArrowColumnVector(org.apache.arrow.vector.ValueVector vector) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleans up memory for this column vector.
|
ColumnarArray |
getArray(int rowId)
Returns the array type value for rowId.
|
byte[] |
getBinary(int rowId)
Returns the binary type value for rowId.
|
boolean |
getBoolean(int rowId)
Returns the boolean type value for rowId.
|
byte |
getByte(int rowId)
Returns the byte type value for rowId.
|
ArrowColumnVector |
getChild(int ordinal) |
Decimal |
getDecimal(int rowId,
int precision,
int scale)
Returns the decimal type value for rowId.
|
double |
getDouble(int rowId)
Returns the double type value for rowId.
|
float |
getFloat(int rowId)
Returns the float type value for rowId.
|
int |
getInt(int rowId)
Returns the int type value for rowId.
|
long |
getLong(int rowId)
Returns the long type value for rowId.
|
ColumnarMap |
getMap(int rowId)
Returns the map type value for rowId.
|
short |
getShort(int rowId)
Returns the short type value for rowId.
|
org.apache.spark.unsafe.types.UTF8String |
getUTF8String(int rowId)
Returns the string type value for rowId.
|
boolean |
hasNull()
Returns true if this column vector contains any null values.
|
boolean |
isNullAt(int rowId)
Returns whether the value at rowId is NULL.
|
int |
numNulls()
Returns the number of nulls in this column vector.
|
dataType, getBooleans, getBytes, getDoubles, getFloats, getInterval, getInts, getLongs, getShorts, getStruct
public ArrowColumnVector(org.apache.arrow.vector.ValueVector vector)
public boolean hasNull()
ColumnVector
hasNull
in class ColumnVector
public int numNulls()
ColumnVector
numNulls
in class ColumnVector
public void close()
ColumnVector
close
in interface AutoCloseable
close
in class ColumnVector
public boolean isNullAt(int rowId)
ColumnVector
isNullAt
in class ColumnVector
public boolean getBoolean(int rowId)
ColumnVector
getBoolean
in class ColumnVector
public byte getByte(int rowId)
ColumnVector
getByte
in class ColumnVector
public short getShort(int rowId)
ColumnVector
getShort
in class ColumnVector
public int getInt(int rowId)
ColumnVector
getInt
in class ColumnVector
public long getLong(int rowId)
ColumnVector
getLong
in class ColumnVector
public float getFloat(int rowId)
ColumnVector
getFloat
in class ColumnVector
public double getDouble(int rowId)
ColumnVector
getDouble
in class ColumnVector
public Decimal getDecimal(int rowId, int precision, int scale)
ColumnVector
getDecimal
in class ColumnVector
public org.apache.spark.unsafe.types.UTF8String getUTF8String(int rowId)
ColumnVector
getUTF8String
in class ColumnVector
public byte[] getBinary(int rowId)
ColumnVector
getBinary
in class ColumnVector
public ColumnarArray getArray(int rowId)
ColumnVector
ColumnarArray
and return it in
this method. ColumnarArray
requires a ColumnVector
that stores the data of all
the elements of all the arrays in this vector, and an offset and length which points to a range
in that ColumnVector
, and the range represents the array for rowId. Implementations
are free to decide where to put the data vector and offsets and lengths. For example, we can
use the first child vector as the data vector, and store offsets and lengths in 2 int arrays in
this vector.getArray
in class ColumnVector
public ColumnarMap getMap(int rowId)
ColumnVector
ColumnarMap
and return it in
this method. ColumnarMap
requires a ColumnVector
that stores the data of all
the keys of all the maps in this vector, and another ColumnVector
that stores the data
of all the values of all the maps in this vector, and a pair of offset and length which
specify the range of the key/value array that belongs to the map type value at rowId.getMap
in class ColumnVector
public ArrowColumnVector getChild(int ordinal)