org.apache.spark.sql

SchemaRDD

class SchemaRDD extends RDD[Row] with SchemaRDDLike

:: AlphaComponent :: An RDD of Row objects that has an associated schema. In addition to standard RDD functions, SchemaRDDs can be used in relational queries, as shown in the examples below.

Importing a SQLContext brings an implicit into scope that automatically converts a standard RDD whose elements are scala case classes into a SchemaRDD. This conversion can also be done explicitly using the createSchemaRDD function on a SQLContext.

A SchemaRDD can also be created by loading data in from external sources. Examples are loading data from Parquet files by using the parquetFile method on SQLContext and loading JSON datasets by using jsonFile and jsonRDD methods on SQLContext.

SQL Queries

A SchemaRDD can be registered as a table in the SQLContext that was used to create it. Once an RDD has been registered as a table, it can be used in the FROM clause of SQL statements.

// One method for defining the schema of an RDD is to make a case class with the desired column
// names and types.
case class Record(key: Int, value: String)

val sc: SparkContext // An existing spark context.
val sqlContext = new SQLContext(sc)

// Importing the SQL context gives access to all the SQL functions and implicit conversions.
import sqlContext._

val rdd = sc.parallelize((1 to 100).map(i => Record(i, s"val_$i")))
// Any RDD containing case classes can be registered as a table.  The schema of the table is
// automatically inferred using scala reflection.
rdd.registerTempTable("records")

val results: SchemaRDD = sql("SELECT * FROM records")

Language Integrated Queries

case class Record(key: Int, value: String)

val sc: SparkContext // An existing spark context.
val sqlContext = new SQLContext(sc)

// Importing the SQL context gives access to all the SQL functions and implicit conversions.
import sqlContext._

val rdd = sc.parallelize((1 to 100).map(i => Record(i, "val_" + i)))

// Example of language integrated queries.
rdd.where('key === 1).orderBy('value.asc).select('key).collect()
Annotations
@AlphaComponent()
Linear Supertypes
SchemaRDDLike, RDD[Row], Logging, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SchemaRDD
  2. SchemaRDDLike
  3. RDD
  4. Logging
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SchemaRDD(sqlContext: SQLContext, baseLogicalPlan: LogicalPlan)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def ++(other: RDD[Row]): RDD[Row]

    Definition Classes
    RDD
  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. def aggregate(aggregateExprs: Expression*): SchemaRDD

    Performs an aggregation over all Rows in this RDD.

    Performs an aggregation over all Rows in this RDD. This is equivalent to a groupBy with no grouping expressions.

    schemaRDD.aggregate(Sum('sales) as 'totalSales)
  8. def aggregate[U](zeroValue: U)(seqOp: (U, Row) ⇒ U, combOp: (U, U) ⇒ U)(implicit arg0: ClassTag[U]): U

    Definition Classes
    RDD
  9. def as(alias: Symbol): SchemaRDD

    Applies a qualifier to the attributes of this relation.

    Applies a qualifier to the attributes of this relation. Can be used to disambiguate attributes with the same name, for example, when performing self-joins.

    val x = schemaRDD.where('a === 1).as('x)
    val y = schemaRDD.where('a === 2).as('y)
    x.join(y).where("x.a".attr === "y.a".attr),
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. val baseLogicalPlan: LogicalPlan

    Definition Classes
    SchemaRDD → SchemaRDDLike
  12. def baseSchemaRDD: SchemaRDD

    Definition Classes
    SchemaRDD → SchemaRDDLike
  13. def cache(): SchemaRDD.this.type

    Overridden cache function will always use the in-memory columnar caching.

    Overridden cache function will always use the in-memory columnar caching.

    Definition Classes
    SchemaRDD → RDD
  14. def cartesian[U](other: RDD[U])(implicit arg0: ClassTag[U]): RDD[(Row, U)]

    Definition Classes
    RDD
  15. def checkpoint(): Unit

    Definition Classes
    RDD
  16. def clearDependencies(): Unit

    Attributes
    protected
    Definition Classes
    RDD
  17. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def coalesce(numPartitions: Int, shuffle: Boolean = false)(implicit ord: Ordering[Row] = null): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  19. def collect(): Array[Row]

    Definition Classes
    SchemaRDD → RDD
  20. def collect[U](f: PartialFunction[Row, U])(implicit arg0: ClassTag[U]): RDD[U]

    Definition Classes
    RDD
  21. def compute(split: Partition, context: TaskContext): Iterator[Row]

    Definition Classes
    SchemaRDD → RDD
  22. def context: SparkContext

    Definition Classes
    RDD
  23. def count(): Long

    :: Experimental :: Return the number of elements in the RDD.

    :: Experimental :: Return the number of elements in the RDD. Unlike the base RDD implementation of count, this implementation leverages the query optimizer to compute the count on the SchemaRDD, which supports features such as filter pushdown.

    Definition Classes
    SchemaRDD → RDD
    Annotations
    @Experimental()
  24. def countApprox(timeout: Long, confidence: Double): PartialResult[BoundedDouble]

    Definition Classes
    RDD
    Annotations
    @Experimental()
  25. def countApproxDistinct(relativeSD: Double): Long

    Definition Classes
    RDD
  26. def countApproxDistinct(p: Int, sp: Int): Long

    Definition Classes
    RDD
    Annotations
    @Experimental()
  27. def countByValue()(implicit ord: Ordering[Row]): Map[Row, Long]

    Definition Classes
    RDD
  28. def countByValueApprox(timeout: Long, confidence: Double)(implicit ord: Ordering[Row]): PartialResult[Map[Row, BoundedDouble]]

    Definition Classes
    RDD
    Annotations
    @Experimental()
  29. final def dependencies: Seq[Dependency[_]]

    Definition Classes
    RDD
  30. def distinct(numPartitions: Int)(implicit ord: Ordering[Row] = null): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  31. def distinct(): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  32. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  33. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  34. def except(otherPlan: SchemaRDD): SchemaRDD

    Performs a relational except on two SchemaRDDs

    Performs a relational except on two SchemaRDDs

    otherPlan

    the SchemaRDD that should be excepted from this one.

  35. def filter(f: (Row) ⇒ Boolean): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  36. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  37. def first(): Row

    Definition Classes
    RDD
  38. def firstParent[U](implicit arg0: ClassTag[U]): RDD[U]

    Attributes
    protected[org.apache.spark]
    Definition Classes
    RDD
  39. def flatMap[U](f: (Row) ⇒ TraversableOnce[U])(implicit arg0: ClassTag[U]): RDD[U]

    Definition Classes
    RDD
  40. def fold(zeroValue: Row)(op: (Row, Row) ⇒ Row): Row

    Definition Classes
    RDD
  41. def foreach(f: (Row) ⇒ Unit): Unit

    Definition Classes
    RDD
  42. def foreachPartition(f: (Iterator[Row]) ⇒ Unit): Unit

    Definition Classes
    RDD
  43. def generate(generator: Generator, join: Boolean = false, outer: Boolean = false, alias: Option[String] = None): SchemaRDD

    :: Experimental :: Applies the given Generator, or table generating function, to this relation.

    :: Experimental :: Applies the given Generator, or table generating function, to this relation.

    generator

    A table generating function. The API for such functions is likely to change in future releases

    join

    when set to true, each output row of the generator is joined with the input row that produced it.

    outer

    when set to true, at least one row will be produced for each input row, similar to an OUTER JOIN in SQL. When no output rows are produced by the generator for a given row, a single row will be output, with NULL values for each of the generated columns.

    alias

    an optional alias that can be used as qualifier for the attributes that are produced by this generate operation.

    Annotations
    @Experimental()
  44. def getCheckpointFile: Option[String]

    Definition Classes
    RDD
  45. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  46. def getDependencies: Seq[Dependency[_]]

    Attributes
    protected
    Definition Classes
    SchemaRDD → RDD
  47. def getPartitions: Array[Partition]

    Definition Classes
    SchemaRDD → RDD
  48. def getPreferredLocations(split: Partition): Seq[String]

    Attributes
    protected
    Definition Classes
    RDD
  49. def getStorageLevel: StorageLevel

    Definition Classes
    RDD
  50. def glom(): RDD[Array[Row]]

    Definition Classes
    RDD
  51. def groupBy(groupingExprs: Expression*)(aggregateExprs: Expression*): SchemaRDD

    Performs a grouping followed by an aggregation.

    Performs a grouping followed by an aggregation.

    schemaRDD.groupBy('year)(Sum('sales) as 'totalSales)
  52. def groupBy[K](f: (Row) ⇒ K, p: Partitioner)(implicit kt: ClassTag[K], ord: Ordering[K]): RDD[(K, Iterable[Row])]

    Definition Classes
    RDD
  53. def groupBy[K](f: (Row) ⇒ K, numPartitions: Int)(implicit kt: ClassTag[K]): RDD[(K, Iterable[Row])]

    Definition Classes
    RDD
  54. def groupBy[K](f: (Row) ⇒ K)(implicit kt: ClassTag[K]): RDD[(K, Iterable[Row])]

    Definition Classes
    RDD
  55. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  56. val id: Int

    Definition Classes
    RDD
  57. def insertInto(tableName: String): Unit

    :: Experimental :: Appends the rows from this RDD to the specified table.

    :: Experimental :: Appends the rows from this RDD to the specified table.

    Definition Classes
    SchemaRDDLike
    Annotations
    @Experimental()
  58. def insertInto(tableName: String, overwrite: Boolean): Unit

    :: Experimental :: Adds the rows from this RDD to the specified table, optionally overwriting the existing data.

    :: Experimental :: Adds the rows from this RDD to the specified table, optionally overwriting the existing data.

    Definition Classes
    SchemaRDDLike
    Annotations
    @Experimental()
  59. def intersect(otherPlan: SchemaRDD): SchemaRDD

    Performs a relational intersect on two SchemaRDDs

    Performs a relational intersect on two SchemaRDDs

    otherPlan

    the SchemaRDD that should be intersected with this one.

  60. def intersection(other: RDD[Row], numPartitions: Int): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  61. def intersection(other: RDD[Row], partitioner: Partitioner)(implicit ord: Ordering[Row] = null): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  62. def intersection(other: RDD[Row]): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  63. def isCheckpointed: Boolean

    Definition Classes
    RDD
  64. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  65. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  66. final def iterator(split: Partition, context: TaskContext): Iterator[Row]

    Definition Classes
    RDD
  67. def join(otherPlan: SchemaRDD, joinType: JoinType = Inner, on: Option[Expression] = None): SchemaRDD

    Performs a relational join on two SchemaRDDs

    Performs a relational join on two SchemaRDDs

    otherPlan

    the SchemaRDD that should be joined with this one.

    joinType

    One of Inner, LeftOuter, RightOuter, or FullOuter. Defaults to Inner.

    on

    An optional condition for the join operation. This is equivalent to the ON clause in standard SQL. In the case of Inner joins, specifying a condition is equivalent to adding where clauses after the join.

  68. def keyBy[K](f: (Row) ⇒ K): RDD[(K, Row)]

    Definition Classes
    RDD
  69. def limit(limitNum: Int): SchemaRDD

    Limits the results by the given integer.

    Limits the results by the given integer.

    schemaRDD.limit(10)
  70. def log: Logger

    Attributes
    protected
    Definition Classes
    Logging
  71. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  72. def logDebug(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  73. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  74. def logError(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  75. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  76. def logInfo(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  77. def logName: String

    Attributes
    protected
    Definition Classes
    Logging
  78. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  79. def logTrace(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  80. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  81. def logWarning(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  82. val logicalPlan: LogicalPlan

    Attributes
    protected[org.apache.spark]
    Definition Classes
    SchemaRDDLike
  83. def map[U](f: (Row) ⇒ U)(implicit arg0: ClassTag[U]): RDD[U]

    Definition Classes
    RDD
  84. def mapPartitions[U](f: (Iterator[Row]) ⇒ Iterator[U], preservesPartitioning: Boolean)(implicit arg0: ClassTag[U]): RDD[U]

    Definition Classes
    RDD
  85. def mapPartitionsWithIndex[U](f: (Int, Iterator[Row]) ⇒ Iterator[U], preservesPartitioning: Boolean)(implicit arg0: ClassTag[U]): RDD[U]

    Definition Classes
    RDD
  86. def max()(implicit ord: Ordering[Row]): Row

    Definition Classes
    RDD
  87. def min()(implicit ord: Ordering[Row]): Row

    Definition Classes
    RDD
  88. var name: String

    Definition Classes
    RDD
  89. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  90. final def notify(): Unit

    Definition Classes
    AnyRef
  91. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  92. def orderBy(sortExprs: SortOrder*): SchemaRDD

    Sorts the results by the given expressions.

    Sorts the results by the given expressions.

    schemaRDD.orderBy('a)
    schemaRDD.orderBy('a, 'b)
    schemaRDD.orderBy('a.asc, 'b.desc)
  93. def parent[U](j: Int)(implicit arg0: ClassTag[U]): RDD[U]

    Attributes
    protected[org.apache.spark]
    Definition Classes
    RDD
  94. val partitioner: Option[Partitioner]

    Definition Classes
    RDD
  95. final def partitions: Array[Partition]

    Definition Classes
    RDD
  96. def persist(newLevel: StorageLevel): SchemaRDD.this.type

    Definition Classes
    SchemaRDD → RDD
  97. def persist(): SchemaRDD.this.type

    Definition Classes
    RDD
  98. def pipe(command: Seq[String], env: Map[String, String], printPipeContext: ((String) ⇒ Unit) ⇒ Unit, printRDDElement: (Row, (String) ⇒ Unit) ⇒ Unit, separateWorkingDir: Boolean): RDD[String]

    Definition Classes
    RDD
  99. def pipe(command: String, env: Map[String, String]): RDD[String]

    Definition Classes
    RDD
  100. def pipe(command: String): RDD[String]

    Definition Classes
    RDD
  101. final def preferredLocations(split: Partition): Seq[String]

    Definition Classes
    RDD
  102. def printSchema(): Unit

    Prints out the schema.

    Prints out the schema.

    Definition Classes
    SchemaRDDLike
  103. lazy val queryExecution: QueryExecution

    :: DeveloperApi :: A lazily computed query execution workflow.

    :: DeveloperApi :: A lazily computed query execution workflow. All other RDD operations are passed through to the RDD that is produced by this workflow. This workflow is produced lazily because invoking the whole query optimization pipeline can be expensive.

    The query execution is considered a Developer API as phases may be added or removed in future releases. This execution is only exposed to provide an interface for inspecting the various phases for debugging purposes. Applications should not depend on particular phases existing or producing any specific output, even for exactly the same query.

    Additionally, the RDD exposed by this execution is not designed for consumption by end users. In particular, it does not contain any schema information, and it reuses Row objects internally. This object reuse improves performance, but can make programming against the RDD more difficult. Instead end users should perform RDD operations on a SchemaRDD directly.

    Definition Classes
    SchemaRDDLike
  104. def randomSplit(weights: Array[Double], seed: Long): Array[RDD[Row]]

    Definition Classes
    RDD
  105. def reduce(f: (Row, Row) ⇒ Row): Row

    Definition Classes
    RDD
  106. def registerTempTable(tableName: String): Unit

    Registers this RDD as a temporary table using the given name.

    Registers this RDD as a temporary table using the given name. The lifetime of this temporary table is tied to the SQLContext that was used to create this SchemaRDD.

    Definition Classes
    SchemaRDDLike
  107. def repartition(numPartitions: Int)(implicit ord: Ordering[Row] = null): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  108. def sample(withReplacement: Boolean = true, fraction: Double, seed: Long): SchemaRDD

    :: Experimental :: Returns a sampled version of the underlying dataset.

    :: Experimental :: Returns a sampled version of the underlying dataset.

    Definition Classes
    SchemaRDD → RDD
    Annotations
    @Experimental()
  109. def saveAsObjectFile(path: String): Unit

    Definition Classes
    RDD
  110. def saveAsParquetFile(path: String): Unit

    Saves the contents of this SchemaRDD as a parquet file, preserving the schema.

    Saves the contents of this SchemaRDD as a parquet file, preserving the schema. Files that are written out using this method can be read back in as a SchemaRDD using the parquetFile function.

    Definition Classes
    SchemaRDDLike
  111. def saveAsTable(tableName: String): Unit

    :: Experimental :: Creates a table from the the contents of this SchemaRDD.

    :: Experimental :: Creates a table from the the contents of this SchemaRDD. This will fail if the table already exists.

    Note that this currently only works with SchemaRDDs that are created from a HiveContext as there is no notion of a persisted catalog in a standard SQL context. Instead you can write an RDD out to a parquet file, and then register that file as a table. This "table" can then be the target of an insertInto.

    Definition Classes
    SchemaRDDLike
    Annotations
    @Experimental()
  112. def saveAsTextFile(path: String, codec: Class[_ <: CompressionCodec]): Unit

    Definition Classes
    RDD
  113. def saveAsTextFile(path: String): Unit

    Definition Classes
    RDD
  114. lazy val schema: StructType

    Returns the schema of this SchemaRDD (represented by a StructType).

  115. def schemaString: String

    Returns the schema as a string in the tree format.

    Returns the schema as a string in the tree format.

    Definition Classes
    SchemaRDDLike
  116. def select(exprs: Expression*): SchemaRDD

    Changes the output of this relation to the given expressions, similar to the SELECT clause in SQL.

    Changes the output of this relation to the given expressions, similar to the SELECT clause in SQL.

    schemaRDD.select('a, 'b + 'c, 'd as 'aliasedName)
    exprs

    a set of logical expression that will be evaluated for each input row.

  117. def setName(_name: String): SchemaRDD.this.type

    Definition Classes
    RDD
  118. def sortBy[K](f: (Row) ⇒ K, ascending: Boolean, numPartitions: Int)(implicit ord: Ordering[K], ctag: ClassTag[K]): RDD[Row]

    Definition Classes
    RDD
  119. def sparkContext: SparkContext

    Definition Classes
    RDD
  120. val sqlContext: SQLContext

    Definition Classes
    SchemaRDD → SchemaRDDLike
  121. def subtract(other: RDD[Row], p: Partitioner)(implicit ord: Ordering[Row] = null): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  122. def subtract(other: RDD[Row], numPartitions: Int): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  123. def subtract(other: RDD[Row]): SchemaRDD

    Definition Classes
    SchemaRDD → RDD
  124. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  125. def take(num: Int): Array[Row]

    Definition Classes
    SchemaRDD → RDD
  126. def takeOrdered(num: Int)(implicit ord: Ordering[Row]): Array[Row]

    Definition Classes
    RDD
  127. def takeSample(withReplacement: Boolean, num: Int, seed: Long): Array[Row]

    Definition Classes
    RDD
  128. def toDebugString: String

    Definition Classes
    RDD
  129. def toJSON: RDD[String]

    Returns a new RDD with each row transformed to a JSON string.

  130. def toJavaRDD(): JavaRDD[Row]

    Definition Classes
    RDD
  131. def toJavaSchemaRDD: JavaSchemaRDD

    Returns this RDD as a JavaSchemaRDD.

  132. def toLocalIterator: Iterator[Row]

    Definition Classes
    RDD
  133. def toSchemaRDD: SchemaRDD

    Returns this RDD as a SchemaRDD.

    Returns this RDD as a SchemaRDD. Intended primarily to force the invocation of the implicit conversion from a standard RDD to a SchemaRDD.

  134. def toString(): String

    Definition Classes
    SchemaRDDLike → AnyRef → Any
  135. def top(num: Int)(implicit ord: Ordering[Row]): Array[Row]

    Definition Classes
    RDD
  136. def union(other: RDD[Row]): RDD[Row]

    Definition Classes
    RDD
  137. def unionAll(otherPlan: SchemaRDD): SchemaRDD

    Combines the tuples of two RDDs with the same schema, keeping duplicates.

  138. def unpersist(blocking: Boolean): SchemaRDD.this.type

    Definition Classes
    SchemaRDD → RDD
  139. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  140. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  141. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  142. def where(dynamicUdf: (DynamicRow) ⇒ Boolean): SchemaRDD

    :: Experimental :: Filters tuples using a function over a Dynamic version of a given Row.

    :: Experimental :: Filters tuples using a function over a Dynamic version of a given Row. DynamicRows use scala's Dynamic trait to emulate an ORM of in a dynamically typed language. Since the type of the column is not known at compile time, all attributes are converted to strings before being passed to the function.

    schemaRDD.where(r => r.firstName == "Bob" && r.lastName == "Smith")
    Annotations
    @Experimental()
  143. def where[T1](arg1: Symbol)(udf: (T1) ⇒ Boolean): SchemaRDD

    Filters tuples using a function over the value of the specified column.

    Filters tuples using a function over the value of the specified column.

    schemaRDD.where('a)((a: Int) => ...)
  144. def where(condition: Expression): SchemaRDD

    Filters the output, only returning those rows where condition evaluates to true.

    Filters the output, only returning those rows where condition evaluates to true.

    schemaRDD.where('a === 'b)
    schemaRDD.where('a === 1)
    schemaRDD.where('a + 'b > 10)
  145. def zip[U](other: RDD[U])(implicit arg0: ClassTag[U]): RDD[(Row, U)]

    Definition Classes
    RDD
  146. def zipPartitions[B, C, D, V](rdd2: RDD[B], rdd3: RDD[C], rdd4: RDD[D])(f: (Iterator[Row], Iterator[B], Iterator[C], Iterator[D]) ⇒ Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[C], arg2: ClassTag[D], arg3: ClassTag[V]): RDD[V]

    Definition Classes
    RDD
  147. def zipPartitions[B, C, D, V](rdd2: RDD[B], rdd3: RDD[C], rdd4: RDD[D], preservesPartitioning: Boolean)(f: (Iterator[Row], Iterator[B], Iterator[C], Iterator[D]) ⇒ Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[C], arg2: ClassTag[D], arg3: ClassTag[V]): RDD[V]

    Definition Classes
    RDD
  148. def zipPartitions[B, C, V](rdd2: RDD[B], rdd3: RDD[C])(f: (Iterator[Row], Iterator[B], Iterator[C]) ⇒ Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[C], arg2: ClassTag[V]): RDD[V]

    Definition Classes
    RDD
  149. def zipPartitions[B, C, V](rdd2: RDD[B], rdd3: RDD[C], preservesPartitioning: Boolean)(f: (Iterator[Row], Iterator[B], Iterator[C]) ⇒ Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[C], arg2: ClassTag[V]): RDD[V]

    Definition Classes
    RDD
  150. def zipPartitions[B, V](rdd2: RDD[B])(f: (Iterator[Row], Iterator[B]) ⇒ Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[V]): RDD[V]

    Definition Classes
    RDD
  151. def zipPartitions[B, V](rdd2: RDD[B], preservesPartitioning: Boolean)(f: (Iterator[Row], Iterator[B]) ⇒ Iterator[V])(implicit arg0: ClassTag[B], arg1: ClassTag[V]): RDD[V]

    Definition Classes
    RDD
  152. def zipWithIndex(): RDD[(Row, Long)]

    Definition Classes
    RDD
  153. def zipWithUniqueId(): RDD[(Row, Long)]

    Definition Classes
    RDD

Deprecated Value Members

  1. def filterWith[A](constructA: (Int) ⇒ A)(p: (Row, A) ⇒ Boolean): RDD[Row]

    Definition Classes
    RDD
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use mapPartitionsWithIndex and filter

  2. def flatMapWith[A, U](constructA: (Int) ⇒ A, preservesPartitioning: Boolean)(f: (Row, A) ⇒ Seq[U])(implicit arg0: ClassTag[U]): RDD[U]

    Definition Classes
    RDD
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use mapPartitionsWithIndex and flatMap

  3. def foreachWith[A](constructA: (Int) ⇒ A)(f: (Row, A) ⇒ Unit): Unit

    Definition Classes
    RDD
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use mapPartitionsWithIndex and foreach

  4. def limit(limitExpr: Expression): SchemaRDD

    Annotations
    @deprecated
    Deprecated

    (Since version 1.1.0) use limit with integer argument

  5. def mapPartitionsWithContext[U](f: (TaskContext, Iterator[Row]) ⇒ Iterator[U], preservesPartitioning: Boolean)(implicit arg0: ClassTag[U]): RDD[U]

    Definition Classes
    RDD
    Annotations
    @DeveloperApi() @deprecated
    Deprecated

    (Since version 1.2.0) use TaskContext.get

  6. def mapPartitionsWithSplit[U](f: (Int, Iterator[Row]) ⇒ Iterator[U], preservesPartitioning: Boolean)(implicit arg0: ClassTag[U]): RDD[U]

    Definition Classes
    RDD
    Annotations
    @deprecated
    Deprecated

    (Since version 0.7.0) use mapPartitionsWithIndex

  7. def mapWith[A, U](constructA: (Int) ⇒ A, preservesPartitioning: Boolean)(f: (Row, A) ⇒ U)(implicit arg0: ClassTag[U]): RDD[U]

    Definition Classes
    RDD
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use mapPartitionsWithIndex

  8. def registerAsTable(tableName: String): Unit

    Definition Classes
    SchemaRDDLike
    Annotations
    @deprecated
    Deprecated

    (Since version 1.1) Use registerTempTable instead of registerAsTable.

  9. def toArray(): Array[Row]

    Definition Classes
    RDD
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use collect

Inherited from SchemaRDDLike

Inherited from RDD[Row]

Inherited from Logging

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Language Integrated Queries

Functions that create new queries from SchemaRDDs. The result of all query functions is also a SchemaRDD, allowing multiple operations to be chained using a builder pattern.

SchemaRDD Functions

Base RDD Functions