Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/

import org.apache.spark.SparkContext
import org.apache.spark.sql.SparkSession

/**
Expand All @@ -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()
}
}

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down