Skip to content

Commit

Permalink
Use exact pattern match to prevent future problem like Scala 2.12.
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjoon-hyun committed Mar 16, 2016
1 parent 95f740f commit 38b9752
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ class HiveSparkSubmitSuite
// Before the fix in SPARK-8470, this results in a MissingRequirementError because
// the HiveContext code mistakenly overrides the class loader that contains user classes.
// For more detail, see sql/hive/src/test/resources/regression-test-SPARK-8489/*scala.
import Properties.versionString
val version = versionString.substring(versionString.indexOf(" ") + 1,
versionString.lastIndexOf("."))
val version = Properties.versionNumberString match {
case v if v.startsWith("2.10") || v.startsWith("2.11") => v.substring(0, 4)
case x => throw new Exception(s"Unsupported Scala Version: $x")
}
val testJar = s"sql/hive/src/test/resources/regression-test-SPARK-8489/test-$version.jar"
val args = Seq(
"--conf", "spark.ui.enabled=false",
Expand Down

0 comments on commit 38b9752

Please sign in to comment.