Skip to content
Snippets Groups Projects
Commit ecacb1e8 authored by Burak Yavuz's avatar Burak Yavuz Committed by Yin Huai
Browse files

[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
parent 620605a4
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,7 @@ class DataFrameStatSuite extends SparkFunSuite { ...@@ -78,7 +78,7 @@ class DataFrameStatSuite extends SparkFunSuite {
val rows = crosstab.collect() val rows = crosstab.collect()
rows.foreach { row => rows.foreach { row =>
val i = row.getString(0).toInt val i = row.getString(0).toInt
for (col <- 1 to 9) { for (col <- 1 until columnNames.length) {
val j = columnNames(col).toInt val j = columnNames(col).toInt
assert(row.getLong(col) === expected.getOrElse((i, j), 0).toLong) assert(row.getLong(col) === expected.getOrElse((i, j), 0).toLong)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment