Skip to content

Commit 7e96d7c

Browse files
committed
ArrayOutOfBoundsException fixed for DataFrameStatSuite.crosstab
1 parent 931da5c commit 7e96d7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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 to 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)