Package org.apache.spark.sql.vectorized
Class ColumnarArray
Object
org.apache.spark.sql.catalyst.util.ArrayData
org.apache.spark.sql.vectorized.ColumnarArray
- All Implemented Interfaces:
Serializable
,org.apache.spark.sql.catalyst.expressions.SpecializedGetters
@Evolving
public final class ColumnarArray
extends org.apache.spark.sql.catalyst.util.ArrayData
Array abstraction in
ColumnVector
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionObject[]
array()
org.apache.spark.sql.catalyst.util.ArrayData
copy()
getArray
(int ordinal) byte[]
getBinary
(int ordinal) boolean
getBoolean
(int ordinal) byte
getByte
(int ordinal) getDecimal
(int ordinal, int precision, int scale) double
getDouble
(int ordinal) float
getFloat
(int ordinal) int
getInt
(int ordinal) getInterval
(int ordinal) long
getLong
(int ordinal) getMap
(int ordinal) short
getShort
(int ordinal) getStruct
(int ordinal, int numFields) org.apache.spark.unsafe.types.UTF8String
getUTF8String
(int ordinal) org.apache.spark.unsafe.types.VariantVal
getVariant
(int ordinal) boolean
isNullAt
(int ordinal) int
void
setNullAt
(int ordinal) boolean[]
byte[]
double[]
float[]
int[]
long[]
short[]
void
Methods inherited from class org.apache.spark.sql.catalyst.util.ArrayData
allocateArrayData, foreach, setBoolean, setByte, setDouble, setFloat, setInt, setLong, setShort, toArray, toArrayData, toObjectArray, toSeq
-
Constructor Details
-
ColumnarArray
-
-
Method Details
-
numElements
public int numElements()- Specified by:
numElements
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
copy
public org.apache.spark.sql.catalyst.util.ArrayData copy()- Specified by:
copy
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
toBooleanArray
public boolean[] toBooleanArray()- Overrides:
toBooleanArray
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
toByteArray
public byte[] toByteArray()- Overrides:
toByteArray
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
toShortArray
public short[] toShortArray()- Overrides:
toShortArray
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
toIntArray
public int[] toIntArray()- Overrides:
toIntArray
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
toLongArray
public long[] toLongArray()- Overrides:
toLongArray
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
toFloatArray
public float[] toFloatArray()- Overrides:
toFloatArray
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
toDoubleArray
public double[] toDoubleArray()- Overrides:
toDoubleArray
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
array
- Specified by:
array
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
isNullAt
public boolean isNullAt(int ordinal) -
getBoolean
public boolean getBoolean(int ordinal) -
getByte
public byte getByte(int ordinal) -
getShort
public short getShort(int ordinal) -
getInt
public int getInt(int ordinal) -
getLong
public long getLong(int ordinal) -
getFloat
public float getFloat(int ordinal) -
getDouble
public double getDouble(int ordinal) -
getDecimal
-
getUTF8String
public org.apache.spark.unsafe.types.UTF8String getUTF8String(int ordinal) -
getBinary
public byte[] getBinary(int ordinal) -
getInterval
-
getVariant
public org.apache.spark.unsafe.types.VariantVal getVariant(int ordinal) -
getStruct
-
getArray
-
getMap
-
get
-
update
- Specified by:
update
in classorg.apache.spark.sql.catalyst.util.ArrayData
-
setNullAt
public void setNullAt(int ordinal) - Specified by:
setNullAt
in classorg.apache.spark.sql.catalyst.util.ArrayData
-