Packages

case class StructType(fields: Array[StructField]) extends DataType with Seq[StructField] with Product with Serializable

A StructType object can be constructed by

StructType(fields: Seq[StructField])

For a StructType object, one or multiple StructFields can be extracted by names. If multiple StructFields are extracted, a StructType object will be returned. If a provided name does not have a matching field, it will be ignored. For the case of extracting a single StructField, a null will be returned.

Scala Example:

import org.apache.spark.sql._
import org.apache.spark.sql.types._

val struct =
  StructType(
    StructField("a", IntegerType, true) ::
    StructField("b", LongType, false) ::
    StructField("c", BooleanType, false) :: Nil)

// Extract a single StructField.
val singleField = struct("b")
// singleField: StructField = StructField(b,LongType,false)

// If this struct does not have a field called "d", it throws an exception.
struct("d")
// java.lang.IllegalArgumentException: d does not exist.
//   ...

// Extract multiple StructFields. Field names are provided in a set.
// A StructType object will be returned.
val twoFields = struct(Set("b", "c"))
// twoFields: StructType =
//   StructType(StructField(b,LongType,false), StructField(c,BooleanType,false))

// Any names without matching fields will throw an exception.
// For the case shown below, an exception is thrown due to "d".
struct(Set("b", "c", "d"))
// java.lang.IllegalArgumentException: d does not exist.
//    ...

A org.apache.spark.sql.Row object is used as a value of the StructType.

Scala Example:

import org.apache.spark.sql._
import org.apache.spark.sql.types._

val innerStruct =
  StructType(
    StructField("f1", IntegerType, true) ::
    StructField("f2", LongType, false) ::
    StructField("f3", BooleanType, false) :: Nil)

val struct = StructType(
  StructField("a", innerStruct, true) :: Nil)

// Create a Row with the schema defined by struct
val row = Row(Row(1, 2, true))
Annotations
@Stable()
Since

1.3.0

Linear Supertypes
Serializable, Product, Seq[StructField], SeqOps[StructField, Seq, Seq[StructField]], Seq[StructField], Equals, SeqOps[StructField, [_]Seq[_], Seq[StructField]], PartialFunction[Int, StructField], (Int) => StructField, Iterable[StructField], Iterable[StructField], IterableFactoryDefaults[StructField, [x]Seq[x]], IterableOps[StructField, [_]Seq[_], Seq[StructField]], IterableOnceOps[StructField, [_]Seq[_], Seq[StructField]], IterableOnce[StructField], DataType, AbstractDataType, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StructType
  2. Serializable
  3. Product
  4. Seq
  5. SeqOps
  6. Seq
  7. Equals
  8. SeqOps
  9. PartialFunction
  10. Function1
  11. Iterable
  12. Iterable
  13. IterableFactoryDefaults
  14. IterableOps
  15. IterableOnceOps
  16. IterableOnce
  17. DataType
  18. AbstractDataType
  19. AnyRef
  20. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new StructType()

    No-arg constructor for kryo.

  2. new StructType(fields: Array[StructField])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ++[B >: StructField](suffix: IterableOnce[B]): Seq[B]
    Definition Classes
    IterableOps
    Annotations
    @inline()
  4. final def ++:[B >: StructField](prefix: IterableOnce[B]): Seq[B]
    Definition Classes
    SeqOps → IterableOps
    Annotations
    @inline()
  5. final def +:[B >: StructField](elem: B): Seq[B]
    Definition Classes
    SeqOps
    Annotations
    @inline()
  6. final def :+[B >: StructField](elem: B): Seq[B]
    Definition Classes
    SeqOps
    Annotations
    @inline()
  7. final def :++[B >: StructField](suffix: IterableOnce[B]): Seq[B]
    Definition Classes
    SeqOps
    Annotations
    @inline()
  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def add(name: String, dataType: String, nullable: Boolean, comment: String): StructType

    Creates a new StructType by adding a new field and specifying metadata where the dataType is specified as a String.

    Creates a new StructType by adding a new field and specifying metadata where the dataType is specified as a String.

    val struct = (new StructType)
      .add("a", "int", true, "comment1")
      .add("b", "long", false, "comment2")
      .add("c", "string", true, "comment3")
  10. def add(name: String, dataType: String, nullable: Boolean, metadata: Metadata): StructType

    Creates a new StructType by adding a new field and specifying metadata where the dataType is specified as a String.

    Creates a new StructType by adding a new field and specifying metadata where the dataType is specified as a String.

    val struct = (new StructType)
      .add("a", "int", true, Metadata.empty)
      .add("b", "long", false, Metadata.empty)
      .add("c", "string", true, Metadata.empty)
  11. def add(name: String, dataType: String, nullable: Boolean): StructType

    Creates a new StructType by adding a new field with no metadata where the dataType is specified as a String.

    Creates a new StructType by adding a new field with no metadata where the dataType is specified as a String.

    val struct = (new StructType)
      .add("a", "int", true)
      .add("b", "long", false)
      .add("c", "string", true)
  12. def add(name: String, dataType: String): StructType

    Creates a new StructType by adding a new nullable field with no metadata where the dataType is specified as a String.

    Creates a new StructType by adding a new nullable field with no metadata where the dataType is specified as a String.

    val struct = (new StructType)
      .add("a", "int")
      .add("b", "long")
      .add("c", "string")
  13. def add(name: String, dataType: DataType, nullable: Boolean, comment: String): StructType

    Creates a new StructType by adding a new field and specifying metadata.

    Creates a new StructType by adding a new field and specifying metadata.

    val struct = (new StructType)
      .add("a", IntegerType, true, "comment1")
      .add("b", LongType, false, "comment2")
      .add("c", StringType, true, "comment3")
  14. def add(name: String, dataType: DataType, nullable: Boolean, metadata: Metadata): StructType

    Creates a new StructType by adding a new field and specifying metadata.

    Creates a new StructType by adding a new field and specifying metadata.

    val struct = (new StructType)
      .add("a", IntegerType, true, Metadata.empty)
      .add("b", LongType, false, Metadata.empty)
      .add("c", StringType, true, Metadata.empty)
  15. def add(name: String, dataType: DataType, nullable: Boolean): StructType

    Creates a new StructType by adding a new field with no metadata.

    Creates a new StructType by adding a new field with no metadata.

    val struct = (new StructType) .add("a", IntegerType, true) .add("b", LongType, false) .add("c", StringType, true)

  16. def add(name: String, dataType: DataType): StructType

    Creates a new StructType by adding a new nullable field with no metadata.

    Creates a new StructType by adding a new nullable field with no metadata.

    val struct = (new StructType) .add("a", IntegerType) .add("b", LongType) .add("c", StringType)

  17. def add(field: StructField): StructType

    Creates a new StructType by adding a new field.

    Creates a new StructType by adding a new field.

    val struct = (new StructType)
      .add(StructField("a", IntegerType, true))
      .add(StructField("b", LongType, false))
      .add(StructField("c", StringType, true))
  18. final def addString(b: StringBuilder): StringBuilder
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  19. final def addString(b: StringBuilder, sep: String): StringBuilder
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  20. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
    Definition Classes
    IterableOnceOps
  21. def andThen[C](k: PartialFunction[StructField, C]): PartialFunction[Int, C]
    Definition Classes
    PartialFunction
  22. def andThen[C](k: (StructField) => C): PartialFunction[Int, C]
    Definition Classes
    PartialFunction → Function1
  23. def appended[B >: StructField](elem: B): Seq[B]
    Definition Classes
    SeqOps
  24. def appendedAll[B >: StructField](suffix: IterableOnce[B]): Seq[B]
    Definition Classes
    SeqOps
  25. def apply(fieldIndex: Int): StructField
    Definition Classes
    StructType → SeqOps → Function1
  26. def apply(names: Set[String]): StructType

    Returns a StructType containing StructFields of the given names, preserving the original order of fields.

    Returns a StructType containing StructFields of the given names, preserving the original order of fields.

    Exceptions thrown

    IllegalArgumentException if at least one given field name does not exist

  27. def apply(name: String): StructField

    Extracts the StructField with the given name.

    Extracts the StructField with the given name.

    Exceptions thrown

    IllegalArgumentException if a field with the given name does not exist

  28. def applyOrElse[A1 <: Int, B1 >: StructField](x: A1, default: (A1) => B1): B1
    Definition Classes
    PartialFunction
  29. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  30. def canEqual(that: Any): Boolean
    Definition Classes
    Seq → Equals
  31. def catalogString: String

    String representation for the type saved in external catalogs.

    String representation for the type saved in external catalogs.

    Definition Classes
    StructTypeDataType
  32. def className: String
    Attributes
    protected[this]
    Definition Classes
    Iterable
  33. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  34. final def coll: StructType.this.type
    Attributes
    protected
    Definition Classes
    Iterable → IterableOps
  35. def collect[B](pf: PartialFunction[StructField, B]): Seq[B]
    Definition Classes
    IterableOps → IterableOnceOps
  36. def collectFirst[B](pf: PartialFunction[StructField, B]): Option[B]
    Definition Classes
    IterableOnceOps
  37. def combinations(n: Int): Iterator[Seq[StructField]]
    Definition Classes
    SeqOps
  38. def compose[R](k: PartialFunction[R, Int]): PartialFunction[R, StructField]
    Definition Classes
    PartialFunction
  39. def compose[A](g: (A) => Int): (A) => StructField
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  40. final def concat[B >: StructField](suffix: IterableOnce[B]): Seq[B]
    Definition Classes
    SeqOps → IterableOps
    Annotations
    @inline()
  41. def contains[A1 >: StructField](elem: A1): Boolean
    Definition Classes
    SeqOps
  42. def containsSlice[B >: StructField](that: Seq[B]): Boolean
    Definition Classes
    SeqOps
  43. def copyToArray[B >: StructField](xs: Array[B], start: Int, len: Int): Int
    Definition Classes
    IterableOnceOps
  44. def copyToArray[B >: StructField](xs: Array[B], start: Int): Int
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding()
  45. def copyToArray[B >: StructField](xs: Array[B]): Int
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding()
  46. def corresponds[B](that: Seq[B])(p: (StructField, B) => Boolean): Boolean
    Definition Classes
    SeqOps
  47. def corresponds[B](that: IterableOnce[B])(p: (StructField, B) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  48. def count(p: (StructField) => Boolean): Int
    Definition Classes
    IterableOnceOps
  49. def defaultSize: Int

    The default size of a value of the StructType is the total default sizes of all field types.

    The default size of a value of the StructType is the total default sizes of all field types.

    Definition Classes
    StructTypeDataType
  50. def diff[B >: StructField](that: Seq[B]): Seq[StructField]
    Definition Classes
    SeqOps
  51. def distinct: Seq[StructField]
    Definition Classes
    SeqOps
  52. def distinctBy[B](f: (StructField) => B): Seq[StructField]
    Definition Classes
    SeqOps
  53. def drop(n: Int): Seq[StructField]
    Definition Classes
    IterableOps → IterableOnceOps
  54. def dropRight(n: Int): Seq[StructField]
    Definition Classes
    IterableOps
  55. def dropWhile(p: (StructField) => Boolean): Seq[StructField]
    Definition Classes
    IterableOps → IterableOnceOps
  56. def elementWise: ElementWiseExtractor[Int, StructField]
    Definition Classes
    PartialFunction
  57. def empty: Seq[StructField]
    Definition Classes
    IterableFactoryDefaults → IterableOps
  58. def endsWith[B >: StructField](that: Iterable[B]): Boolean
    Definition Classes
    SeqOps
  59. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  60. def equals(that: Any): Boolean
    Definition Classes
    StructType → Seq → Equals → AnyRef → Any
  61. def exists(p: (StructField) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  62. def fieldIndex(name: String): Int

    Returns the index of a given field.

    Returns the index of a given field.

    Exceptions thrown

    IllegalArgumentException if a field with the given name does not exist

  63. def fieldNames: Array[String]

    Returns all field names in an array.

  64. val fields: Array[StructField]
  65. def filter(pred: (StructField) => Boolean): Seq[StructField]
    Definition Classes
    IterableOps → IterableOnceOps
  66. def filterNot(pred: (StructField) => Boolean): Seq[StructField]
    Definition Classes
    IterableOps → IterableOnceOps
  67. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  68. def find(p: (StructField) => Boolean): Option[StructField]
    Definition Classes
    IterableOnceOps
  69. def findLast(p: (StructField) => Boolean): Option[StructField]
    Definition Classes
    SeqOps
  70. def flatMap[B](f: (StructField) => IterableOnce[B]): Seq[B]
    Definition Classes
    IterableOps → IterableOnceOps
  71. def flatten[B](implicit asIterable: (StructField) => IterableOnce[B]): Seq[B]
    Definition Classes
    IterableOps → IterableOnceOps
  72. def fold[A1 >: StructField](z: A1)(op: (A1, A1) => A1): A1
    Definition Classes
    IterableOnceOps
  73. def foldLeft[B](z: B)(op: (B, StructField) => B): B
    Definition Classes
    IterableOnceOps
  74. def foldRight[B](z: B)(op: (StructField, B) => B): B
    Definition Classes
    IterableOnceOps
  75. def forall(p: (StructField) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  76. def foreach[U](f: (StructField) => U): Unit
    Definition Classes
    IterableOnceOps
  77. def fromSpecific(coll: IterableOnce[StructField]): Seq[StructField]
    Attributes
    protected
    Definition Classes
    IterableFactoryDefaults → IterableOps
  78. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  79. def groupBy[K](f: (StructField) => K): Map[K, Seq[StructField]]
    Definition Classes
    IterableOps
  80. def groupMap[K, B](key: (StructField) => K)(f: (StructField) => B): Map[K, Seq[B]]
    Definition Classes
    IterableOps
  81. def groupMapReduce[K, B](key: (StructField) => K)(f: (StructField) => B)(reduce: (B, B) => B): Map[K, B]
    Definition Classes
    IterableOps
  82. def grouped(size: Int): Iterator[Seq[StructField]]
    Definition Classes
    IterableOps
  83. def hashCode(): Int
    Definition Classes
    StructType → Seq → AnyRef → Any
  84. def head: StructField
    Definition Classes
    IterableOps
  85. def headOption: Option[StructField]
    Definition Classes
    IterableOps
  86. def indexOf[B >: StructField](elem: B): Int
    Definition Classes
    SeqOps
    Annotations
    @deprecatedOverriding()
  87. def indexOf[B >: StructField](elem: B, from: Int): Int
    Definition Classes
    SeqOps
  88. def indexOfSlice[B >: StructField](that: Seq[B]): Int
    Definition Classes
    SeqOps
    Annotations
    @deprecatedOverriding()
  89. def indexOfSlice[B >: StructField](that: Seq[B], from: Int): Int
    Definition Classes
    SeqOps
  90. def indexWhere(p: (StructField) => Boolean): Int
    Definition Classes
    SeqOps
    Annotations
    @deprecatedOverriding()
  91. def indexWhere(p: (StructField) => Boolean, from: Int): Int
    Definition Classes
    SeqOps
  92. def indices: Range
    Definition Classes
    SeqOps
  93. def init: Seq[StructField]
    Definition Classes
    IterableOps
  94. def inits: Iterator[Seq[StructField]]
    Definition Classes
    IterableOps
  95. def intersect[B >: StructField](that: Seq[B]): Seq[StructField]
    Definition Classes
    SeqOps
  96. def isDefinedAt(idx: Int): Boolean
    Definition Classes
    SeqOps
  97. def isEmpty: Boolean
    Definition Classes
    SeqOps → IterableOnceOps
  98. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  99. def isTraversableAgain: Boolean
    Definition Classes
    IterableOps → IterableOnceOps
  100. def iterableFactory: SeqFactory[Seq]
    Definition Classes
    Seq → Seq → Iterable → Iterable → IterableOps
  101. def iterator: Iterator[StructField]
    Definition Classes
    StructType → IterableOnce
  102. def json: String

    The compact JSON representation of this data type.

    The compact JSON representation of this data type.

    Definition Classes
    DataType
  103. def knownSize: Int
    Definition Classes
    IterableOnce
  104. def last: StructField
    Definition Classes
    IterableOps
  105. def lastIndexOf[B >: StructField](elem: B, end: Int): Int
    Definition Classes
    SeqOps
  106. def lastIndexOfSlice[B >: StructField](that: Seq[B]): Int
    Definition Classes
    SeqOps
    Annotations
    @deprecatedOverriding()
  107. def lastIndexOfSlice[B >: StructField](that: Seq[B], end: Int): Int
    Definition Classes
    SeqOps
  108. def lastIndexWhere(p: (StructField) => Boolean): Int
    Definition Classes
    SeqOps
    Annotations
    @deprecatedOverriding()
  109. def lastIndexWhere(p: (StructField) => Boolean, end: Int): Int
    Definition Classes
    SeqOps
  110. def lastOption: Option[StructField]
    Definition Classes
    IterableOps
  111. def lazyZip[B](that: Iterable[B]): LazyZip2[StructField, B, StructType.this.type]
    Definition Classes
    Iterable
  112. def length: Int
    Definition Classes
    StructType → SeqOps
  113. def lengthCompare(that: Iterable[_]): Int
    Definition Classes
    SeqOps
  114. def lengthCompare(len: Int): Int
    Definition Classes
    SeqOps
  115. final def lengthIs: SizeCompareOps
    Definition Classes
    SeqOps
    Annotations
    @inline()
  116. def lift: (Int) => Option[StructField]
    Definition Classes
    PartialFunction
  117. def map[B](f: (StructField) => B): Seq[B]
    Definition Classes
    IterableOps → IterableOnceOps
  118. def max[B >: StructField](implicit ord: Ordering[B]): StructField
    Definition Classes
    IterableOnceOps
  119. def maxBy[B](f: (StructField) => B)(implicit cmp: Ordering[B]): StructField
    Definition Classes
    IterableOnceOps
  120. def maxByOption[B](f: (StructField) => B)(implicit cmp: Ordering[B]): Option[StructField]
    Definition Classes
    IterableOnceOps
  121. def maxOption[B >: StructField](implicit ord: Ordering[B]): Option[StructField]
    Definition Classes
    IterableOnceOps
  122. def min[B >: StructField](implicit ord: Ordering[B]): StructField
    Definition Classes
    IterableOnceOps
  123. def minBy[B](f: (StructField) => B)(implicit cmp: Ordering[B]): StructField
    Definition Classes
    IterableOnceOps
  124. def minByOption[B](f: (StructField) => B)(implicit cmp: Ordering[B]): Option[StructField]
    Definition Classes
    IterableOnceOps
  125. def minOption[B >: StructField](implicit ord: Ordering[B]): Option[StructField]
    Definition Classes
    IterableOnceOps
  126. final def mkString: String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  127. final def mkString(sep: String): String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  128. final def mkString(start: String, sep: String, end: String): String
    Definition Classes
    IterableOnceOps
  129. def names: Array[String]

    Returns all field names in an array.

    Returns all field names in an array. This is an alias of fieldNames.

    Since

    2.4.0

  130. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  131. def newSpecificBuilder: Builder[StructField, Seq[StructField]]
    Attributes
    protected
    Definition Classes
    IterableFactoryDefaults → IterableOps
  132. def nonEmpty: Boolean
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding()
  133. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  134. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  135. def occCounts[B](sq: Seq[B]): Map[B, Int]
    Attributes
    protected[collection]
    Definition Classes
    SeqOps
  136. def orElse[A1 <: Int, B1 >: StructField](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
    Definition Classes
    PartialFunction
  137. def padTo[B >: StructField](len: Int, elem: B): Seq[B]
    Definition Classes
    SeqOps
  138. def partition(p: (StructField) => Boolean): (Seq[StructField], Seq[StructField])
    Definition Classes
    IterableOps
  139. def partitionMap[A1, A2](f: (StructField) => Either[A1, A2]): (Seq[A1], Seq[A2])
    Definition Classes
    IterableOps
  140. def patch[B >: StructField](from: Int, other: IterableOnce[B], replaced: Int): Seq[B]
    Definition Classes
    SeqOps
  141. def permutations: Iterator[Seq[StructField]]
    Definition Classes
    SeqOps
  142. def prepended[B >: StructField](elem: B): Seq[B]
    Definition Classes
    SeqOps
  143. def prependedAll[B >: StructField](prefix: IterableOnce[B]): Seq[B]
    Definition Classes
    SeqOps
  144. def prettyJson: String

    The pretty (i.e.

    The pretty (i.e. indented) JSON representation of this data type.

    Definition Classes
    DataType
  145. def printTreeString(): Unit
  146. def product[B >: StructField](implicit num: Numeric[B]): B
    Definition Classes
    IterableOnceOps
  147. def productElementNames: Iterator[String]
    Definition Classes
    Product
  148. def reduce[B >: StructField](op: (B, B) => B): B
    Definition Classes
    IterableOnceOps
  149. def reduceLeft[B >: StructField](op: (B, StructField) => B): B
    Definition Classes
    IterableOnceOps
  150. def reduceLeftOption[B >: StructField](op: (B, StructField) => B): Option[B]
    Definition Classes
    IterableOnceOps
  151. def reduceOption[B >: StructField](op: (B, B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  152. def reduceRight[B >: StructField](op: (StructField, B) => B): B
    Definition Classes
    IterableOnceOps
  153. def reduceRightOption[B >: StructField](op: (StructField, B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  154. def reverse: Seq[StructField]
    Definition Classes
    SeqOps
  155. def reverseIterator: Iterator[StructField]
    Definition Classes
    SeqOps
  156. def reversed: Iterable[StructField]
    Attributes
    protected
    Definition Classes
    IterableOnceOps
  157. def runWith[U](action: (StructField) => U): (Int) => Boolean
    Definition Classes
    PartialFunction
  158. def sameElements[B >: StructField](that: IterableOnce[B]): Boolean
    Definition Classes
    SeqOps
  159. def scan[B >: StructField](z: B)(op: (B, B) => B): Seq[B]
    Definition Classes
    IterableOps
  160. def scanLeft[B](z: B)(op: (B, StructField) => B): Seq[B]
    Definition Classes
    IterableOps → IterableOnceOps
  161. def scanRight[B](z: B)(op: (StructField, B) => B): Seq[B]
    Definition Classes
    IterableOps
  162. def search[B >: StructField](elem: B, from: Int, to: Int)(implicit ord: Ordering[B]): SearchResult
    Definition Classes
    SeqOps
  163. def search[B >: StructField](elem: B)(implicit ord: Ordering[B]): SearchResult
    Definition Classes
    SeqOps
  164. def segmentLength(p: (StructField) => Boolean, from: Int): Int
    Definition Classes
    SeqOps
  165. final def segmentLength(p: (StructField) => Boolean): Int
    Definition Classes
    SeqOps
  166. def simpleString: String

    Readable string representation for the type.

    Readable string representation for the type.

    Definition Classes
    StructTypeDataType → AbstractDataType
  167. final def size: Int
    Definition Classes
    SeqOps → IterableOnceOps
  168. final def sizeCompare(that: Iterable[_]): Int
    Definition Classes
    SeqOps → IterableOps
  169. final def sizeCompare(otherSize: Int): Int
    Definition Classes
    SeqOps → IterableOps
  170. final def sizeIs: SizeCompareOps
    Definition Classes
    IterableOps
    Annotations
    @inline()
  171. def slice(from: Int, until: Int): Seq[StructField]
    Definition Classes
    IterableOps → IterableOnceOps
  172. def sliding(size: Int, step: Int): Iterator[Seq[StructField]]
    Definition Classes
    IterableOps
  173. def sliding(size: Int): Iterator[Seq[StructField]]
    Definition Classes
    IterableOps
  174. def sortBy[B](f: (StructField) => B)(implicit ord: Ordering[B]): Seq[StructField]
    Definition Classes
    SeqOps
  175. def sortWith(lt: (StructField, StructField) => Boolean): Seq[StructField]
    Definition Classes
    SeqOps
  176. def sorted[B >: StructField](implicit ord: Ordering[B]): Seq[StructField]
    Definition Classes
    SeqOps
  177. def span(p: (StructField) => Boolean): (Seq[StructField], Seq[StructField])
    Definition Classes
    IterableOps → IterableOnceOps
  178. def splitAt(n: Int): (Seq[StructField], Seq[StructField])
    Definition Classes
    IterableOps → IterableOnceOps
  179. def sql: String
    Definition Classes
    StructTypeDataType
  180. def startsWith[B >: StructField](that: IterableOnce[B], offset: Int): Boolean
    Definition Classes
    SeqOps
  181. def stepper[S <: Stepper[_]](implicit shape: StepperShape[StructField, S]): S
    Definition Classes
    IterableOnce
  182. def stringPrefix: String
    Attributes
    protected[this]
    Definition Classes
    Seq → Iterable
  183. def sum[B >: StructField](implicit num: Numeric[B]): B
    Definition Classes
    IterableOnceOps
  184. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  185. def tail: Seq[StructField]
    Definition Classes
    IterableOps
  186. def tails: Iterator[Seq[StructField]]
    Definition Classes
    IterableOps
  187. def take(n: Int): Seq[StructField]
    Definition Classes
    IterableOps → IterableOnceOps
  188. def takeRight(n: Int): Seq[StructField]
    Definition Classes
    IterableOps
  189. def takeWhile(p: (StructField) => Boolean): Seq[StructField]
    Definition Classes
    IterableOps → IterableOnceOps
  190. def tapEach[U](f: (StructField) => U): Seq[StructField]
    Definition Classes
    IterableOps → IterableOnceOps
  191. def to[C1](factory: Factory[StructField, C1]): C1
    Definition Classes
    IterableOnceOps
  192. def toArray[B >: StructField](implicit arg0: ClassTag[B]): Array[B]
    Definition Classes
    IterableOnceOps
  193. def toAttributes: Seq[AttributeReference]
    Attributes
    protected[spark.sql]
  194. final def toBuffer[B >: StructField]: Buffer[B]
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  195. def toDDL: String

    Returns a string containing a schema in DDL format.

    Returns a string containing a schema in DDL format. For example, the following value: StructType(Seq(StructField("eventId", IntegerType), StructField("s", StringType))) will be converted to eventId INT, s STRING. The returned DDL schema can be used in a table creation.

    Since

    2.4.0

  196. def toIndexedSeq: IndexedSeq[StructField]
    Definition Classes
    IterableOnceOps
  197. def toList: List[StructField]
    Definition Classes
    IterableOnceOps
  198. def toMap[K, V](implicit ev: <:<[StructField, (K, V)]): Map[K, V]
    Definition Classes
    IterableOnceOps
  199. final def toSeq: StructType.this.type
    Definition Classes
    Seq → IterableOnceOps
  200. def toSet[B >: StructField]: Set[B]
    Definition Classes
    IterableOnceOps
  201. def toString(): String
    Definition Classes
    StructType → Seq → Function1 → Iterable → AnyRef → Any
  202. def toVector: Vector[StructField]
    Definition Classes
    IterableOnceOps
  203. def transpose[B](implicit asIterable: (StructField) => Iterable[B]): Seq[Seq[B]]
    Definition Classes
    IterableOps
  204. def treeString(maxDepth: Int): String
  205. def treeString: String
  206. def typeName: String

    Name of the type used in JSON serialization.

    Name of the type used in JSON serialization.

    Definition Classes
    DataType
  207. def unapply(a: Int): Option[StructField]
    Definition Classes
    PartialFunction
  208. def unzip[A1, A2](implicit asPair: (StructField) => (A1, A2)): (Seq[A1], Seq[A2])
    Definition Classes
    IterableOps
  209. def unzip3[A1, A2, A3](implicit asTriple: (StructField) => (A1, A2, A3)): (Seq[A1], Seq[A2], Seq[A3])
    Definition Classes
    IterableOps
  210. def updated[B >: StructField](index: Int, elem: B): Seq[B]
    Definition Classes
    SeqOps
  211. def view: SeqView[StructField]
    Definition Classes
    SeqOps → IterableOps
  212. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  213. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  214. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  215. def withFilter(p: (StructField) => Boolean): WithFilter[StructField, [_]Seq[_]]
    Definition Classes
    IterableOps
  216. def zip[B](that: IterableOnce[B]): Seq[(StructField, B)]
    Definition Classes
    IterableOps
  217. def zipAll[A1 >: StructField, B](that: Iterable[B], thisElem: A1, thatElem: B): Seq[(A1, B)]
    Definition Classes
    IterableOps
  218. def zipWithIndex: Seq[(StructField, Int)]
    Definition Classes
    IterableOps → IterableOnceOps

Deprecated Value Members

  1. final def /:[B](z: B)(op: (B, StructField) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldLeft instead of /:

  2. final def :\[B](z: B)(op: (StructField, B) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldRight instead of :\

  3. def aggregate[B](z: => B)(seqop: (B, StructField) => B, combop: (B, B) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) aggregate is not relevant for sequential collections. Use foldLeft(z)(seqop) instead.

  4. def companion: IterableFactory[[_]Seq[_]]
    Definition Classes
    IterableOps
    Annotations
    @deprecated @deprecatedOverriding() @inline()
    Deprecated

    (Since version 2.13.0) Use iterableFactory instead

  5. final def copyToBuffer[B >: StructField](dest: Buffer[B]): Unit
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use dest ++= coll instead

  6. def hasDefiniteSize: Boolean
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)

  7. final def prefixLength(p: (StructField) => Boolean): Int
    Definition Classes
    SeqOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use segmentLength instead of prefixLength

  8. final def repr: Seq[StructField]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use coll instead of repr in a collection implementation, use the collection value itself from the outside

  9. def reverseMap[B](f: (StructField) => B): Seq[B]
    Definition Classes
    SeqOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)

  10. def seq: StructType.this.type
    Definition Classes
    Iterable
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Iterable.seq always returns the iterable itself

  11. final def toIterable: StructType.this.type
    Definition Classes
    Iterable → IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.7) toIterable is internal and will be made protected; its name is similar to toList or toSeq, but it doesn't copy non-immutable collections

  12. final def toIterator: Iterator[StructField]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .iterator instead of .toIterator

  13. final def toStream: Stream[StructField]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .to(LazyList) instead of .toStream

  14. final def toTraversable: Traversable[StructField]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) toTraversable is internal and will be made protected; its name is similar to toList or toSeq, but it doesn't copy non-immutable collections

  15. final def union[B >: StructField](that: Seq[B]): Seq[B]
    Definition Classes
    SeqOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use concat instead

  16. def view(from: Int, until: Int): View[StructField]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use .view.slice(from, until) instead of .view(from, until)

Inherited from Serializable

Inherited from Product

Inherited from Seq[StructField]

Inherited from SeqOps[StructField, Seq, Seq[StructField]]

Inherited from Seq[StructField]

Inherited from Equals

Inherited from SeqOps[StructField, [_]Seq[_], Seq[StructField]]

Inherited from PartialFunction[Int, StructField]

Inherited from (Int) => StructField

Inherited from Iterable[StructField]

Inherited from Iterable[StructField]

Inherited from IterableFactoryDefaults[StructField, [x]Seq[x]]

Inherited from IterableOps[StructField, [_]Seq[_], Seq[StructField]]

Inherited from IterableOnceOps[StructField, [_]Seq[_], Seq[StructField]]

Inherited from IterableOnce[StructField]

Inherited from DataType

Inherited from AbstractDataType

Inherited from AnyRef

Inherited from Any

Ungrouped