Skip to content

Commit

Permalink
move the testData into beforeAll()
Browse files Browse the repository at this point in the history
  • Loading branch information
chenghao-intel committed May 21, 2015
1 parent 8ddcb25 commit 09b7e8b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.spark.sql.hive

import org.apache.spark.sql.QueryTest
import org.apache.spark.sql.{DataFrame, QueryTest}
import org.apache.spark.sql.functions._
import org.apache.spark.sql.hive.test.TestHive
import org.apache.spark.sql.hive.test.TestHive._
Expand All @@ -30,12 +30,12 @@ case class TestData2Int(a: Int, b: Int)
// `hive` package is optional in compiling, however, `SQLContext.sql` doesn't
// support the `cube` or `rollup` yet.
class HiveDataFrameAnalyticsSuite extends QueryTest with BeforeAndAfterAll {
val testData =
TestHive.sparkContext.parallelize(
TestData2Int(1, 2) ::
TestData2Int(2, 4) :: Nil).toDF()
private var testData: DataFrame = _

override def beforeAll() {
testData = sparkContext.parallelize(
TestData2Int(1, 2) ::
TestData2Int(2, 4) :: Nil).toDF()
TestHive.registerDataFrameAsTable(testData, "mytable")
}

Expand Down

0 comments on commit 09b7e8b

Please sign in to comment.