final class UnsafeArrayData extends ArrayData with Externalizable with KryoSerializable
An Unsafe implementation of Array which is backed by raw memory instead of Java objects.
Each array has four parts: [numElements][null bits][values or offset&length][variable length portion]
The numElements is 8 bytes storing the number of elements of this array.
In the null bits region, we store 1 bit per element, represents whether an element is null
Its total size is ceil(numElements / 8) bytes, and it is aligned to 8-byte boundaries.
In the values or offset&length region, we store the content of elements. For fields that hold
fixed-length primitive types, such as long, double, or int, we store the value directly
in the field. The whole fixed-length portion (even for byte) is aligned to 8-byte boundaries.
For fields with non-primitive or variable-length values, we store a relative offset
(w.r.t. the base address of the array) that points to the beginning of the variable-length field
and length (they are combined into a long). For variable length portion, each is aligned
to 8-byte boundaries.
Instances of UnsafeArrayData act as pointers to row data stored in this format.
- Alphabetic
- By Inheritance
- UnsafeArrayData
- KryoSerializable
- Externalizable
- ArrayData
- Serializable
- SpecializedGetters
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new UnsafeArrayData()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def array(): Array[AnyRef]
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def copy(): UnsafeArrayData
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: AnyRef): Boolean
- Definition Classes
- UnsafeArrayData → AnyRef → Any
- Annotations
- @Override()
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def foreach(elementType: DataType, f: (Int, Any) => Unit): Unit
- Definition Classes
- ArrayData
- def get(ordinal: Int, dataType: DataType): AnyRef
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getArray(ordinal: Int): UnsafeArrayData
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getBaseObject(): AnyRef
- def getBaseOffset(): Long
- def getBinary(ordinal: Int): Array[Byte]
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getBoolean(ordinal: Int): Boolean
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getByte(ordinal: Int): Byte
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDecimal(ordinal: Int, precision: Int, scale: Int): Decimal
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getDouble(ordinal: Int): Double
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getFloat(ordinal: Int): Float
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getInt(ordinal: Int): Int
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getInterval(ordinal: Int): CalendarInterval
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getLong(ordinal: Int): Long
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getMap(ordinal: Int): UnsafeMapData
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getShort(ordinal: Int): Short
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getSizeInBytes(): Int
- def getStruct(ordinal: Int, numFields: Int): UnsafeRow
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def getUTF8String(ordinal: Int): UTF8String
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- def hashCode(): Int
- Definition Classes
- UnsafeArrayData → AnyRef → Any
- Annotations
- @Override()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNullAt(ordinal: Int): Boolean
- Definition Classes
- UnsafeArrayData → SpecializedGetters
- Annotations
- @Override()
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def numElements(): Int
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def pointTo(baseObject: AnyRef, baseOffset: Long, sizeInBytes: Int): Unit
Update this UnsafeArrayData to point to different backing data.
Update this UnsafeArrayData to point to different backing data.
- baseObject
the base object
- baseOffset
the offset within the base object
- sizeInBytes
the size of this array's backing data, in bytes
- def read(kryo: Kryo, input: Input): Unit
- Definition Classes
- UnsafeArrayData → KryoSerializable
- Annotations
- @Override()
- def readExternal(in: ObjectInput): Unit
- Definition Classes
- UnsafeArrayData → Externalizable
- Annotations
- @Override()
- def setBoolean(ordinal: Int, value: Boolean): Unit
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def setByte(ordinal: Int, value: Byte): Unit
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def setDouble(ordinal: Int, value: Double): Unit
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def setFloat(ordinal: Int, value: Float): Unit
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def setInt(ordinal: Int, value: Int): Unit
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def setLong(ordinal: Int, value: Long): Unit
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def setNullAt(ordinal: Int): Unit
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def setShort(ordinal: Int, value: Short): Unit
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toArray[T](elementType: DataType)(implicit arg0: ClassTag[T]): Array[T]
- Definition Classes
- ArrayData
- def toBooleanArray(): Array[Boolean]
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def toByteArray(): Array[Byte]
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def toDoubleArray(): Array[Double]
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def toFloatArray(): Array[Float]
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def toIntArray(): Array[Int]
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def toLongArray(): Array[Long]
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def toObjectArray(elementType: DataType): Array[AnyRef]
- Definition Classes
- ArrayData
- def toSeq[T](dataType: DataType): IndexedSeq[T]
- Definition Classes
- ArrayData
- def toShortArray(): Array[Short]
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- def toString(): String
- Definition Classes
- AnyRef → Any
- def update(ordinal: Int, value: AnyRef): Unit
- Definition Classes
- UnsafeArrayData → ArrayData
- Annotations
- @Override()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def write(kryo: Kryo, output: Output): Unit
- Definition Classes
- UnsafeArrayData → KryoSerializable
- Annotations
- @Override()
- def writeExternal(out: ObjectOutput): Unit
- Definition Classes
- UnsafeArrayData → Externalizable
- Annotations
- @Override()
- def writeTo(buffer: ByteBuffer): Unit
- def writeToMemory(target: AnyRef, targetOffset: Long): Unit