final class UnsafeRow extends InternalRow with Externalizable with KryoSerializable
An Unsafe implementation of Row which is backed by raw memory instead of Java objects.
Each tuple has three parts: [null-tracking bit set] [values] [variable length portion]
The null-tracking bit set is aligned to 8-byte word boundaries. It stores one bit per field.
In the values region, we store one 8-byte word per field. For fields that hold fixed-length
primitive types, such as long, double, or int, we store the value directly in the word. For
fields with non-primitive or variable-length values, we store a relative offset (w.r.t. the
base address of the row) that points to the beginning of the variable-length field, and length
(they are combined into a long).
Instances of UnsafeRow act as pointers to row data stored in this format.
- Alphabetic
- By Inheritance
- UnsafeRow
- KryoSerializable
- Externalizable
- InternalRow
- Serializable
- SpecializedGetters
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 anyNull(): Boolean
Returns true if there are any NULL values in this row.
Returns true if there are any NULL values in this row.
- Definition Classes
- UnsafeRow → InternalRow
- 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(): UnsafeRow
Copies this row, returning a self-contained UnsafeRow that stores its data in an internal byte array rather than referencing data stored in a data page.
Copies this row, returning a self-contained UnsafeRow that stores its data in an internal byte array rather than referencing data stored in a data page.
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def copyFrom(row: UnsafeRow): Unit
Copies the input UnsafeRow to this UnsafeRow, and resize the underlying byte[] when the input row is larger than this row.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: AnyRef): Boolean
- Definition Classes
- UnsafeRow → AnyRef → Any
- Annotations
- @Override()
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get(ordinal: Int, dataType: DataType): AnyRef
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getArray(ordinal: Int): UnsafeArrayData
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getBaseObject(): AnyRef
- def getBaseOffset(): Long
- def getBinary(ordinal: Int): Array[Byte]
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getBoolean(ordinal: Int): Boolean
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getByte(ordinal: Int): Byte
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getBytes(): Array[Byte]
Returns the underlying bytes for this UnsafeRow.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDecimal(ordinal: Int, precision: Int, scale: Int): Decimal
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getDouble(ordinal: Int): Double
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getFloat(ordinal: Int): Float
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getInt(ordinal: Int): Int
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getInterval(ordinal: Int): CalendarInterval
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getLong(ordinal: Int): Long
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getMap(ordinal: Int): UnsafeMapData
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getShort(ordinal: Int): Short
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getSizeInBytes(): Int
- def getString(ordinal: Int): String
- Definition Classes
- InternalRow
- def getStruct(ordinal: Int, numFields: Int): UnsafeRow
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def getUTF8String(ordinal: Int): UTF8String
- Definition Classes
- UnsafeRow → SpecializedGetters
- Annotations
- @Override()
- def hashCode(): Int
- Definition Classes
- UnsafeRow → AnyRef → Any
- Annotations
- @Override()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNullAt(ordinal: Int): Boolean
- Definition Classes
- UnsafeRow → 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 numFields(): Int
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def pointTo(buf: Array[Byte], sizeInBytes: Int): Unit
Update this UnsafeRow to point to the underlying byte array.
Update this UnsafeRow to point to the underlying byte array.
- buf
byte array to point to
- sizeInBytes
the number of bytes valid in the byte array
- def pointTo(baseObject: AnyRef, baseOffset: Long, sizeInBytes: Int): Unit
Update this UnsafeRow to point to different backing data.
Update this UnsafeRow to point to different backing data.
- baseObject
the base object
- baseOffset
the offset within the base object
- sizeInBytes
the size of this row's backing data, in bytes
- def read(kryo: Kryo, in: Input): Unit
- Definition Classes
- UnsafeRow → KryoSerializable
- Annotations
- @Override()
- def readExternal(in: ObjectInput): Unit
- Definition Classes
- UnsafeRow → Externalizable
- Annotations
- @Override()
- def setBoolean(ordinal: Int, value: Boolean): Unit
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setByte(ordinal: Int, value: Byte): Unit
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setDecimal(ordinal: Int, value: Decimal, precision: Int): Unit
Updates the decimal column.
Updates the decimal column.
Note: In order to support update a decimal with precision > 18, CAN NOT call setNullAt() for this column.
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setDouble(ordinal: Int, value: Double): Unit
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setFloat(ordinal: Int, value: Float): Unit
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setInt(ordinal: Int, value: Int): Unit
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setInterval(ordinal: Int, value: CalendarInterval): Unit
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setLong(ordinal: Int, value: Long): Unit
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setNotNullAt(i: Int): Unit
- def setNullAt(i: Int): Unit
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setShort(ordinal: Int, value: Short): Unit
- Definition Classes
- UnsafeRow → InternalRow
- Annotations
- @Override()
- def setTotalSize(sizeInBytes: Int): Unit
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toSeq(schema: StructType): Seq[Any]
- Definition Classes
- InternalRow
- def toSeq(fieldTypes: Seq[DataType]): Seq[Any]
Return a Scala Seq representing the row.
Return a Scala Seq representing the row. Elements are placed in the same order in the Seq.
- Definition Classes
- InternalRow
- def toString(): String
- Definition Classes
- UnsafeRow → AnyRef → Any
- Annotations
- @Override()
- def update(ordinal: Int, value: AnyRef): Unit
Updates the value at column
i.Updates the value at column
i. Note that after updating, the given value will be kept in this row, and the caller side should guarantee that this value won't be changed afterwards.- Definition Classes
- UnsafeRow → InternalRow
- 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, out: Output): Unit
- Definition Classes
- UnsafeRow → KryoSerializable
- Annotations
- @Override()
- def writeExternal(out: ObjectOutput): Unit
- Definition Classes
- UnsafeRow → Externalizable
- Annotations
- @Override()
- def writeFieldTo(ordinal: Int, buffer: ByteBuffer): Unit
Write the bytes of var-length field into ByteBuffer
Write the bytes of var-length field into ByteBuffer
Note: only work with HeapByteBuffer
- def writeTo(buffer: ByteBuffer): Unit
- def writeToMemory(target: AnyRef, targetOffset: Long): Unit
Writes the content of this row into a memory address, identified by an object and an offset.
Writes the content of this row into a memory address, identified by an object and an offset. The target memory address must already been allocated, and have enough space to hold all the bytes in this string.
- def writeToStream(out: OutputStream, writeBuffer: Array[Byte]): Unit
Write this UnsafeRow's underlying bytes to the given OutputStream.
Write this UnsafeRow's underlying bytes to the given OutputStream.
- out
the stream to write to.
- writeBuffer
a byte array for buffering chunks of off-heap data while writing to the output stream. If this row is backed by an on-heap byte array, then this buffer will not be used and may be null.