Skip to content

Commit c8d71a4

Browse files
committed
[SPARK-9305] Rename org.apache.spark.Row to Item.
It's a thing used in test cases, but named Row. Pretty annoying because everytime I search for Row, it shows up before the Spark SQL Row, which is what a developer wants most of the time. Author: Reynold Xin <[email protected]> Closes #7638 from rxin/remove-row and squashes the following commits: aeda52d [Reynold Xin] [SPARK-9305] Rename org.apache.spark.Row to Item.
1 parent 431ca39 commit c8d71a4

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

core/src/test/scala/org/apache/spark/PartitioningSuite.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
9191

9292
test("RangePartitioner for keys that are not Comparable (but with Ordering)") {
9393
// Row does not extend Comparable, but has an implicit Ordering defined.
94-
implicit object RowOrdering extends Ordering[Row] {
95-
override def compare(x: Row, y: Row): Int = x.value - y.value
94+
implicit object RowOrdering extends Ordering[Item] {
95+
override def compare(x: Item, y: Item): Int = x.value - y.value
9696
}
9797

98-
val rdd = sc.parallelize(1 to 4500).map(x => (Row(x), Row(x)))
98+
val rdd = sc.parallelize(1 to 4500).map(x => (Item(x), Item(x)))
9999
val partitioner = new RangePartitioner(1500, rdd)
100-
partitioner.getPartition(Row(100))
100+
partitioner.getPartition(Item(100))
101101
}
102102

103103
test("RangPartitioner.sketch") {
@@ -252,4 +252,4 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
252252
}
253253

254254

255-
private sealed case class Row(value: Int)
255+
private sealed case class Item(value: Int)

sql/catalyst/src/test/scala/org/apache/spark/sql/RandomDataGenerator.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ object RandomDataGenerator {
6969
* Returns a function which generates random values for the given [[DataType]], or `None` if no
7070
* random data generator is defined for that data type. The generated values will use an external
7171
* representation of the data type; for example, the random generator for [[DateType]] will return
72-
* instances of [[java.sql.Date]] and the generator for [[StructType]] will return a
73-
* [[org.apache.spark.Row]].
72+
* instances of [[java.sql.Date]] and the generator for [[StructType]] will return a [[Row]].
7473
*
7574
* @param dataType the type to generate values for
7675
* @param nullable whether null values should be generated

0 commit comments

Comments
 (0)