Skip to content

Commit e218f5f

Browse files
committed
Rename ExistingRDD to ExternalRDD.
1 parent 62aca29 commit e218f5f

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class SparkSession private(
238238
def createDataFrame[A <: Product : TypeTag](rdd: RDD[A]): DataFrame = {
239239
SparkSession.setActiveSession(this)
240240
val encoder = Encoders.product[A]
241-
Dataset.ofRows(self, ExistingRDD(rdd)(self)(encoder))
241+
Dataset.ofRows(self, ExternalRDD(rdd)(self)(encoder))
242242
}
243243

244244
/**
@@ -423,7 +423,7 @@ class SparkSession private(
423423
*/
424424
@Experimental
425425
def createDataset[T : Encoder](data: RDD[T]): Dataset[T] = {
426-
Dataset[T](self, ExistingRDD(data)(self))
426+
Dataset[T](self, ExternalRDD(data)(self))
427427
}
428428

429429
/**

sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,28 +74,28 @@ object RDDConversions {
7474
}
7575
}
7676

77-
private[sql] object ExistingRDD {
77+
private[sql] object ExternalRDD {
7878

7979
def apply[T: Encoder](rdd: RDD[T])(session: SparkSession): LogicalPlan = {
80-
val exisitingRdd = ExistingRDD(CatalystSerde.generateObjAttr[T], rdd)(session)
81-
CatalystSerde.serialize[T](exisitingRdd)
80+
val externalRdd = ExternalRDD(CatalystSerde.generateObjAttr[T], rdd)(session)
81+
CatalystSerde.serialize[T](externalRdd)
8282
}
8383
}
8484

8585
/** Logical plan node for scanning data from an RDD. */
86-
private[sql] case class ExistingRDD[T](
86+
private[sql] case class ExternalRDD[T](
8787
outputObjAttr: Attribute,
8888
rdd: RDD[T])(session: SparkSession)
8989
extends LeafNode with ObjectProducer with MultiInstanceRelation {
9090

9191
override protected final def otherCopyArgs: Seq[AnyRef] = session :: Nil
9292

93-
override def newInstance(): ExistingRDD.this.type =
94-
ExistingRDD(outputObjAttr.newInstance(), rdd)(session).asInstanceOf[this.type]
93+
override def newInstance(): ExternalRDD.this.type =
94+
ExternalRDD(outputObjAttr.newInstance(), rdd)(session).asInstanceOf[this.type]
9595

9696
override def sameResult(plan: LogicalPlan): Boolean = {
9797
plan.canonicalized match {
98-
case ExistingRDD(_, otherRDD) => rdd.id == otherRDD.id
98+
case ExternalRDD(_, otherRDD) => rdd.id == otherRDD.id
9999
case _ => false
100100
}
101101
}
@@ -110,7 +110,7 @@ private[sql] case class ExistingRDD[T](
110110
}
111111

112112
/** Physical plan node for scanning data from an RDD. */
113-
private[sql] case class ExistingRDDScanExec[T](
113+
private[sql] case class ExternalRDDScanExec[T](
114114
outputObjAttr: Attribute,
115115
rdd: RDD[T]) extends LeafExecNode with ObjectProducerExec {
116116

sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
409409
case logical.RepartitionByExpression(expressions, child, nPartitions) =>
410410
exchange.ShuffleExchange(HashPartitioning(
411411
expressions, nPartitions.getOrElse(numPartitions)), planLater(child)) :: Nil
412-
case ExistingRDD(outputObjAttr, rdd) => ExistingRDDScanExec(outputObjAttr, rdd) :: Nil
412+
case ExternalRDD(outputObjAttr, rdd) => ExternalRDDScanExec(outputObjAttr, rdd) :: Nil
413413
case LogicalRDD(output, rdd) => RDDScanExec(output, rdd, "ExistingRDD") :: Nil
414414
case BroadcastHint(child) => planLater(child) :: Nil
415415
case _ => Nil

0 commit comments

Comments
 (0)