Skip to content
Snippets Groups Projects
Commit 02c07e89 authored by Dilip Biswal's avatar Dilip Biswal Committed by Andrew Or
Browse files

[SPARK-14893][SQL] Re-enable HiveSparkSubmitSuite SPARK-8489 test after HiveContext is removed

## What changes were proposed in this pull request?

Enable the test that was disabled when HiveContext was removed.

## How was this patch tested?

Made sure the enabled test passes with the new jar.

Author: Dilip Biswal <dbiswal@us.ibm.com>

Closes #12924 from dilipbiswal/spark-14893.
parent 08db4912
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,6 @@
* limitations under the License.
*/
import org.apache.spark.SparkContext
import org.apache.spark.sql.SparkSession
/**
......@@ -33,15 +32,18 @@ object Main {
def main(args: Array[String]) {
// scalastyle:off println
println("Running regression test for SPARK-8489.")
val sc = new SparkContext("local", "testing")
val sparkSession = SparkSession.withHiveSupport(sc)
val spark = SparkSession.builder
.master("local")
.appName("testing")
.enableHiveSupport()
.getOrCreate()
// This line should not throw scala.reflect.internal.MissingRequirementError.
// See SPARK-8470 for more detail.
val df = sparkSession.createDataFrame(Seq(MyCoolClass("1", "2", "3")))
val df = spark.createDataFrame(Seq(MyCoolClass("1", "2", "3")))
df.collect()
println("Regression test for SPARK-8489 success!")
// scalastyle:on println
sc.stop()
spark.stop()
}
}
No preview for this file type
No preview for this file type
......@@ -142,8 +142,7 @@ class HiveSparkSubmitSuite
runSparkSubmit(args)
}
// TODO: re-enable this after rebuilding the jar (HiveContext was removed)
ignore("SPARK-8489: MissingRequirementError during reflection") {
test("SPARK-8489: MissingRequirementError during reflection") {
// This test uses a pre-built jar to test SPARK-8489. In a nutshell, this test creates
// a HiveContext and uses it to create a data frame from an RDD using reflection.
// Before the fix in SPARK-8470, this results in a MissingRequirementError because
......
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