Package io.delta.kernel.internal.data
Class GenericColumnVector
Object
io.delta.kernel.internal.data.GenericColumnVector
- All Implemented Interfaces:
ColumnVector,AutoCloseable
A generic implementation of
ColumnVector that wraps a list of values.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Cleans up memory for this column vector.getArray(int rowId) Return the array value located atrowId.byte[]getBinary(int rowId) Returns the binary type value forrowId.booleangetBoolean(int rowId) Returns the boolean type value forrowId.bytegetByte(int rowId) Returns the byte type value forrowId.getChild(int ordinal) Get the child vector associated with the given ordinal.getDecimal(int rowId) Returns the decimal type value forrowId.doublegetDouble(int rowId) Returns the double type value forrowId.floatgetFloat(int rowId) Returns the float type value forrowId.intgetInt(int rowId) Returns the int type value forrowId.longgetLong(int rowId) Returns the long type value forrowId.getMap(int rowId) Return the map value located atrowId.shortgetShort(int rowId) Returns the short type value forrowId.intgetSize()getString(int rowId) Returns the string type value forrowId.booleanisNullAt(int rowId)
-
Constructor Details
-
GenericColumnVector
-
-
Method Details
-
getDataType
- Specified by:
getDataTypein interfaceColumnVector- Returns:
- the data type of this column vector.
-
getSize
public int getSize()- Specified by:
getSizein interfaceColumnVector- Returns:
- number of elements in the vector
-
close
public void close()Description copied from interface:ColumnVectorCleans up memory for this column vector. The column vector is not usable after this.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceColumnVector
-
isNullAt
public boolean isNullAt(int rowId) - Specified by:
isNullAtin interfaceColumnVector- Parameters:
rowId-- Returns:
- whether the value at
rowIdis NULL.
-
getBoolean
public boolean getBoolean(int rowId) Description copied from interface:ColumnVectorReturns the boolean type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getBooleanin interfaceColumnVector- Parameters:
rowId-- Returns:
- Boolean value at the given row id
-
getByte
public byte getByte(int rowId) Description copied from interface:ColumnVectorReturns the byte type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getBytein interfaceColumnVector- Parameters:
rowId-- Returns:
- Byte value at the given row id
-
getShort
public short getShort(int rowId) Description copied from interface:ColumnVectorReturns the short type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getShortin interfaceColumnVector- Parameters:
rowId-- Returns:
- Short value at the given row id
-
getInt
public int getInt(int rowId) Description copied from interface:ColumnVectorReturns the int type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getIntin interfaceColumnVector- Parameters:
rowId-- Returns:
- Integer value at the given row id
-
getLong
public long getLong(int rowId) Description copied from interface:ColumnVectorReturns the long type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getLongin interfaceColumnVector- Parameters:
rowId-- Returns:
- Long value at the given row id
-
getFloat
public float getFloat(int rowId) Description copied from interface:ColumnVectorReturns the float type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getFloatin interfaceColumnVector- Parameters:
rowId-- Returns:
- Float value at the given row id
-
getDouble
public double getDouble(int rowId) Description copied from interface:ColumnVectorReturns the double type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getDoublein interfaceColumnVector- Parameters:
rowId-- Returns:
- Double value at the given row id
-
getDecimal
Description copied from interface:ColumnVectorReturns the decimal type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getDecimalin interfaceColumnVector- Parameters:
rowId-- Returns:
- Decimal value at the given row id
-
getString
Description copied from interface:ColumnVectorReturns the string type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getStringin interfaceColumnVector- Parameters:
rowId-- Returns:
- String value at the given row id
-
getBinary
public byte[] getBinary(int rowId) Description copied from interface:ColumnVectorReturns the binary type value forrowId. The return value is undefined and can be anything, if the slot forrowIdis null.- Specified by:
getBinaryin interfaceColumnVector- Parameters:
rowId-- Returns:
- Binary value at the given row id
-
getArray
Description copied from interface:ColumnVectorReturn the array value located atrowId. Returns null if the slot forrowIdis null- Specified by:
getArrayin interfaceColumnVector
-
getMap
Description copied from interface:ColumnVectorReturn the map value located atrowId. Returns null if the slot forrowIdis null- Specified by:
getMapin interfaceColumnVector
-
getChild
Description copied from interface:ColumnVectorGet the child vector associated with the given ordinal. This method is applicable only to thestructtype columns.- Specified by:
getChildin interfaceColumnVector- Parameters:
ordinal- Ordinal of the child vector to return.
-