Skip to content

Commit ffc793a

Browse files
brkyvzyhuai
authored andcommitted
[SPARK-8715] ArrayOutOfBoundsException fixed for DataFrameStatSuite.crosstab
cc yhuai Author: Burak Yavuz <brkyvz@gmail.com> Closes #7100 from brkyvz/ct-flakiness-fix and squashes the following commits: abc299a [Burak Yavuz] change 'to' to until 7e96d7c [Burak Yavuz] ArrayOutOfBoundsException fixed for DataFrameStatSuite.crosstab (cherry picked from commit ecacb1e) Signed-off-by: Yin Huai <yhuai@databricks.com>
1 parent 80d5356 commit ffc793a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/core/src/test/scala/org/apache/spark/sql/DataFrameStatSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class DataFrameStatSuite extends SparkFunSuite {
7878
val rows = crosstab.collect()
7979
rows.foreach { row =>
8080
val i = row.getString(0).toInt
81-
for (col <- 1 to 9) {
81+
for (col <- 1 until columnNames.length) {
8282
val j = columnNames(col).toInt
8383
assert(row.getLong(col) === expected.getOrElse((i, j), 0).toLong)
8484
}

0 commit comments

Comments
 (0)