[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 ecacb1e88a
)
Signed-off-by: Yin Huai <yhuai@databricks.com>
This commit is contained in:
parent
80d53565ae
commit
ffc793a6ca
|
@ -78,7 +78,7 @@ class DataFrameStatSuite extends SparkFunSuite {
|
|||
val rows = crosstab.collect()
|
||||
rows.foreach { row =>
|
||||
val i = row.getString(0).toInt
|
||||
for (col <- 1 to 9) {
|
||||
for (col <- 1 until columnNames.length) {
|
||||
val j = columnNames(col).toInt
|
||||
assert(row.getLong(col) === expected.getOrElse((i, j), 0).toLong)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue