Packages

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 bit set] [values] [variable length portion]

The bit set is used for null tracking and 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.

Linear Supertypes
KryoSerializable, Externalizable, InternalRow, Serializable, SpecializedGetters, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnsafeRow
  2. KryoSerializable
  3. Externalizable
  4. InternalRow
  5. Serializable
  6. SpecializedGetters
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new UnsafeRow()
  2. new UnsafeRow(numFields: Int)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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
    UnsafeRowInternalRow
    Annotations
    @Override()
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. 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
    UnsafeRowInternalRow
    Annotations
    @Override()
  8. 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.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(other: AnyRef): Boolean
    Definition Classes
    UnsafeRow → AnyRef → Any
    Annotations
    @Override()
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. def get(ordinal: Int, dataType: DataType): AnyRef
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  13. def getArray(ordinal: Int): UnsafeArrayData
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  14. def getBaseObject(): AnyRef
  15. def getBaseOffset(): Long
  16. def getBinary(ordinal: Int): Array[Byte]
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  17. def getBoolean(ordinal: Int): Boolean
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  18. def getByte(ordinal: Int): Byte
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  19. def getBytes(): Array[Byte]

    Returns the underlying bytes for this UnsafeRow.

  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def getDecimal(ordinal: Int, precision: Int, scale: Int): Decimal
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  22. def getDouble(ordinal: Int): Double
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  23. def getFloat(ordinal: Int): Float
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  24. def getInt(ordinal: Int): Int
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  25. def getInterval(ordinal: Int): CalendarInterval
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  26. def getLong(ordinal: Int): Long
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  27. def getMap(ordinal: Int): UnsafeMapData
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  28. def getShort(ordinal: Int): Short
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  29. def getSizeInBytes(): Int
  30. def getString(ordinal: Int): String
    Definition Classes
    InternalRow
  31. def getStruct(ordinal: Int, numFields: Int): UnsafeRow
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  32. def getUTF8String(ordinal: Int): UTF8String
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  33. def hashCode(): Int
    Definition Classes
    UnsafeRow → AnyRef → Any
    Annotations
    @Override()
  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. def isNullAt(ordinal: Int): Boolean
    Definition Classes
    UnsafeRowSpecializedGetters
    Annotations
    @Override()
  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. def numFields(): Int
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  40. 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

  41. 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

  42. def read(kryo: Kryo, in: Input): Unit
    Definition Classes
    UnsafeRow → KryoSerializable
    Annotations
    @Override()
  43. def readExternal(in: ObjectInput): Unit
    Definition Classes
    UnsafeRow → Externalizable
    Annotations
    @Override()
  44. def setBoolean(ordinal: Int, value: Boolean): Unit
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  45. def setByte(ordinal: Int, value: Byte): Unit
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  46. 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
    UnsafeRowInternalRow
    Annotations
    @Override()
  47. def setDouble(ordinal: Int, value: Double): Unit
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  48. def setFloat(ordinal: Int, value: Float): Unit
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  49. def setInt(ordinal: Int, value: Int): Unit
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  50. def setInterval(ordinal: Int, value: CalendarInterval): Unit
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  51. def setLong(ordinal: Int, value: Long): Unit
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  52. def setNotNullAt(i: Int): Unit
  53. def setNullAt(i: Int): Unit
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  54. def setShort(ordinal: Int, value: Short): Unit
    Definition Classes
    UnsafeRowInternalRow
    Annotations
    @Override()
  55. def setTotalSize(sizeInBytes: Int): Unit
  56. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  57. def toSeq(schema: StructType): Seq[Any]
    Definition Classes
    InternalRow
  58. 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
  59. def toString(): String
    Definition Classes
    UnsafeRow → AnyRef → Any
    Annotations
    @Override()
  60. 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
    UnsafeRowInternalRow
    Annotations
    @Override()
  61. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  62. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  63. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  64. def write(kryo: Kryo, out: Output): Unit
    Definition Classes
    UnsafeRow → KryoSerializable
    Annotations
    @Override()
  65. def writeExternal(out: ObjectOutput): Unit
    Definition Classes
    UnsafeRow → Externalizable
    Annotations
    @Override()
  66. 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

  67. def writeTo(buffer: ByteBuffer): Unit
  68. 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.

  69. 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.

Inherited from KryoSerializable

Inherited from Externalizable

Inherited from InternalRow

Inherited from Serializable

Inherited from SpecializedGetters

Inherited from AnyRef

Inherited from Any

Ungrouped