Package io.delta.kernel.data
Interface ColumnVector
- All Superinterfaces:
AutoCloseable
Represents zero or more values of a single column.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Cleans up memory for this column vector.default ArrayValue
getArray
(int rowId) Return the array value located atrowId
.default byte[]
getBinary
(int rowId) Returns the binary type value forrowId
.default boolean
getBoolean
(int rowId) Returns the boolean type value forrowId
.default byte
getByte
(int rowId) Returns the byte type value forrowId
.default ColumnVector
getChild
(int ordinal) Get the child vector associated with the given ordinal.default BigDecimal
getDecimal
(int rowId) Returns the decimal type value forrowId
.default double
getDouble
(int rowId) Returns the double type value forrowId
.default float
getFloat
(int rowId) Returns the float type value forrowId
.default int
getInt
(int rowId) Returns the int type value forrowId
.default long
getLong
(int rowId) Returns the long type value forrowId
.default MapValue
getMap
(int rowId) Return the map value located atrowId
.default short
getShort
(int rowId) Returns the short type value forrowId
.int
getSize()
default String
getString
(int rowId) Returns the string type value forrowId
.boolean
isNullAt
(int rowId)
-
Method Details
-
getDataType
DataType getDataType()- Returns:
- the data type of this column vector.
-
getSize
int getSize()- Returns:
- number of elements in the vector
-
close
void close()Cleans up memory for this column vector. The column vector is not usable after this.- Specified by:
close
in interfaceAutoCloseable
-
isNullAt
boolean isNullAt(int rowId) - Parameters:
rowId
-- Returns:
- whether the value at
rowId
is NULL.
-
getBoolean
default boolean getBoolean(int rowId) Returns the boolean type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- Boolean value at the given row id
-
getByte
default byte getByte(int rowId) Returns the byte type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- Byte value at the given row id
-
getShort
default short getShort(int rowId) Returns the short type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- Short value at the given row id
-
getInt
default int getInt(int rowId) Returns the int type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- Integer value at the given row id
-
getLong
default long getLong(int rowId) Returns the long type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- Long value at the given row id
-
getFloat
default float getFloat(int rowId) Returns the float type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- Float value at the given row id
-
getDouble
default double getDouble(int rowId) Returns the double type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- Double value at the given row id
-
getBinary
default byte[] getBinary(int rowId) Returns the binary type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- Binary value at the given row id
-
getString
Returns the string type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- String value at the given row id
-
getDecimal
Returns the decimal type value forrowId
. The return value is undefined and can be anything, if the slot forrowId
is null.- Parameters:
rowId
-- Returns:
- Decimal value at the given row id
-
getMap
Return the map value located atrowId
. Returns null if the slot forrowId
is null -
getArray
Return the array value located atrowId
. Returns null if the slot forrowId
is null -
getChild
Get the child vector associated with the given ordinal. This method is applicable only to thestruct
type columns.- Parameters:
ordinal
- Ordinal of the child vector to return.
-