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 TypeMethodDescriptionvoidclose()Cleans up memory for this column vector.default ArrayValuegetArray(int rowId) Return the array value located atrowId.default byte[]getBinary(int rowId) Returns the binary type value forrowId.default booleangetBoolean(int rowId) Returns the boolean type value forrowId.default bytegetByte(int rowId) Returns the byte type value forrowId.default ColumnVectorgetChild(int ordinal) Get the child vector associated with the given ordinal.default BigDecimalgetDecimal(int rowId) Returns the decimal type value forrowId.default doublegetDouble(int rowId) Returns the double type value forrowId.default floatgetFloat(int rowId) Returns the float type value forrowId.default intgetInt(int rowId) Returns the int type value forrowId.default longgetLong(int rowId) Returns the long type value forrowId.default MapValuegetMap(int rowId) Return the map value located atrowId.default shortgetShort(int rowId) Returns the short type value forrowId.intgetSize()default StringgetString(int rowId) Returns the string type value forrowId.booleanisNullAt(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:
closein interfaceAutoCloseable
-
isNullAt
boolean isNullAt(int rowId) - Parameters:
rowId-- Returns:
- whether the value at
rowIdis 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 forrowIdis 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 forrowIdis 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 forrowIdis 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 forrowIdis 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 forrowIdis 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 forrowIdis 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 forrowIdis 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 forrowIdis 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 forrowIdis 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 forrowIdis null.- Parameters:
rowId-- Returns:
- Decimal value at the given row id
-
getMap
Return the map value located atrowId. Returns null if the slot forrowIdis null -
getArray
Return the array value located atrowId. Returns null if the slot forrowIdis null -
getChild
Get the child vector associated with the given ordinal. This method is applicable only to thestructtype columns.- Parameters:
ordinal- Ordinal of the child vector to return.
-