Repository: spark
Updated Branches:
  refs/heads/branch-1.4 f08c6f319 -> f0e421351


[SPARK-7320] [SQL] [Minor] Move the testData into beforeAll()

Follow up of #6340, to avoid the test report missing once it fails.

Author: Cheng Hao <[email protected]>

Closes #6312 from chenghao-intel/rollup_minor and squashes the following 
commits:

b03a25f [Cheng Hao] simplify the testData instantiation
09b7e8b [Cheng Hao] move the testData into beforeAll()

(cherry picked from commit feb3a9d3f81f19850fddbd9639823f59a60efa52)
Signed-off-by: Yin Huai <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f0e42135
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f0e42135
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f0e42135

Branch: refs/heads/branch-1.4
Commit: f0e42135175f5fe61b99b88b327f334e9df9a2bc
Parents: f08c6f3
Author: Cheng Hao <[email protected]>
Authored: Thu May 21 09:28:00 2015 -0700
Committer: Yin Huai <[email protected]>
Committed: Thu May 21 09:28:10 2015 -0700

----------------------------------------------------------------------
 .../spark/sql/hive/HiveDataFrameAnalyticsSuite.scala      | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/f0e42135/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameAnalyticsSuite.scala
----------------------------------------------------------------------
diff --git 
a/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameAnalyticsSuite.scala
 
b/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameAnalyticsSuite.scala
index 99de146..fb10f85 100644
--- 
a/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameAnalyticsSuite.scala
+++ 
b/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameAnalyticsSuite.scala
@@ -17,25 +17,21 @@
 
 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._
 import org.apache.spark.sql.hive.test.TestHive.implicits._
 import org.scalatest.BeforeAndAfterAll
 
-case class TestData2Int(a: Int, b: Int)
-
 // TODO ideally we should put the test suite into the package `sql`, as
 // `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 = Seq((1, 2), (2, 4)).toDF("a", "b")
     TestHive.registerDataFrameAsTable(testData, "mytable")
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to