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, Serializable, SpecializedGetters, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnsafeRow
  2. KryoSerializable
  3. Externalizable
  4. InternalRow
  5. Serializable
  6. Serializable
  7. SpecializedGetters
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @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
  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: Any): Boolean
    Definition Classes
    UnsafeRow → AnyRef → Any
  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
  13. def getArray(ordinal: Int): UnsafeArrayData
    Definition Classes
    UnsafeRowSpecializedGetters
  14. def getBaseObject(): AnyRef
  15. def getBaseOffset(): Long
  16. def getBinary(ordinal: Int): Array[Byte]
    Definition Classes
    UnsafeRowSpecializedGetters
  17. def getBoolean(ordinal: Int): Boolean
    Definition Classes
    UnsafeRowSpecializedGetters
  18. def getByte(ordinal: Int): Byte
    Definition Classes
    UnsafeRowSpecializedGetters
  19. def getBytes(): Array[Byte]

    Returns the underlying bytes for this UnsafeRow.

  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def getDecimal(ordinal: Int, precision: Int, scale: Int): Decimal
    Definition Classes
    UnsafeRowSpecializedGetters
  22. def getDouble(ordinal: Int): Double
    Definition Classes
    UnsafeRowSpecializedGetters
  23. def getFloat(ordinal: Int): Float
    Definition Classes
    UnsafeRowSpecializedGetters
  24. def getInt(ordinal: Int): Int
    Definition Classes
    UnsafeRowSpecializedGetters
  25. def getInterval(ordinal: Int): CalendarInterval
    Definition Classes
    UnsafeRowSpecializedGetters
  26. def getLong(ordinal: Int): Long
    Definition Classes
    UnsafeRowSpecializedGetters
  27. def getMap(ordinal: Int): UnsafeMapData
    Definition Classes
    UnsafeRowSpecializedGetters
  28. def getShort(ordinal: Int): Short
    Definition Classes
    UnsafeRowSpecializedGetters
  29. def getSizeInBytes(): Int
  30. def getString(ordinal: Int): String
    Definition Classes
    InternalRow
  31. def getStruct(ordinal: Int, numFields: Int): UnsafeRow
    Definition Classes
    UnsafeRowSpecializedGetters
  32. def getUTF8String(ordinal: Int): UTF8String
    Definition Classes
    UnsafeRowSpecializedGetters
  33. def hashCode(): Int
    Definition Classes
    UnsafeRow → AnyRef → Any
  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. def isNullAt(ordinal: Int): Boolean
    Definition Classes
    UnsafeRowSpecializedGetters
  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
  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: Any, 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
  43. def readExternal(in: ObjectInput): Unit
    Definition Classes
    UnsafeRow → Externalizable
  44. def setBoolean(ordinal: Int, value: Boolean): Unit
    Definition Classes
    UnsafeRowInternalRow
  45. def setByte(ordinal: Int, value: Byte): Unit
    Definition Classes
    UnsafeRowInternalRow
  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
  47. def setDouble(ordinal: Int, value: Double): Unit
    Definition Classes
    UnsafeRowInternalRow
  48. def setFloat(ordinal: Int, value: Float): Unit
    Definition Classes
    UnsafeRowInternalRow
  49. def setInt(ordinal: Int, value: Int): Unit
    Definition Classes
    UnsafeRowInternalRow
  50. def setInterval(ordinal: Int, value: CalendarInterval): Unit
    Definition Classes
    UnsafeRowInternalRow
  51. def setLong(ordinal: Int, value: Long): Unit
    Definition Classes
    UnsafeRowInternalRow
  52. def setNotNullAt(i: Int): Unit
  53. def setNullAt(i: Int): Unit
    Definition Classes
    UnsafeRowInternalRow
  54. def setShort(ordinal: Int, value: Short): Unit
    Definition Classes
    UnsafeRowInternalRow
  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
  60. def update(ordinal: Int, value: Any): 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
  61. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  64. def write(kryo: Kryo, out: Output): Unit
    Definition Classes
    UnsafeRow → KryoSerializable
  65. def writeExternal(out: ObjectOutput): Unit
    Definition Classes
    UnsafeRow → Externalizable
  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: Any, 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 Serializable

Inherited from SpecializedGetters

Inherited from AnyRef

Inherited from Any

Ungrouped