aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala
diff options
context:
space:
mode:
Diffstat (limited to 'sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala')
-rw-r--r--sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala b/sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala
index 2590040f2e..10a017df83 100644
--- a/sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala
+++ b/sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala
@@ -15,8 +15,8 @@
* limitations under the License.
*/
-import org.apache.spark.{SparkConf, SparkContext}
-import org.apache.spark.sql.hive.HiveContext
+import org.apache.spark.SparkContext
+import org.apache.spark.sql.SparkSession
/**
* Entry point in test application for SPARK-8489.
@@ -28,15 +28,16 @@ import org.apache.spark.sql.hive.HiveContext
*
* This is used in org.apache.spark.sql.hive.HiveSparkSubmitSuite.
*/
+// TODO: actually rebuild this jar with the new changes.
object Main {
def main(args: Array[String]) {
// scalastyle:off println
println("Running regression test for SPARK-8489.")
val sc = new SparkContext("local", "testing")
- val hc = new HiveContext(sc)
+ val sparkSession = SparkSession.withHiveSupport(sc)
// This line should not throw scala.reflect.internal.MissingRequirementError.
// See SPARK-8470 for more detail.
- val df = hc.createDataFrame(Seq(MyCoolClass("1", "2", "3")))
+ val df = sparkSession.createDataFrame(Seq(MyCoolClass("1", "2", "3")))
df.collect()
println("Regression test for SPARK-8489 success!")
// scalastyle:on println