aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorgatorsmile <gatorsmile@gmail.com>2016-04-06 15:48:28 +0200
committerHerman van Hovell <hvanhovell@questtec.nl>2016-04-06 15:48:28 +0200
commit25a4c8e0c5c63ca4722b1da6182e0e0f0f48b73a (patch)
tree6afec94346adf58b963fdb521fe4075c348c9c72 /sql
parent78c1076d0421cc41cbdb788f38b13c9a00e8f561 (diff)
downloadspark-25a4c8e0c5c63ca4722b1da6182e0e0f0f48b73a.tar.gz
spark-25a4c8e0c5c63ca4722b1da6182e0e0f0f48b73a.tar.bz2
spark-25a4c8e0c5c63ca4722b1da6182e0e0f0f48b73a.zip
[SPARK-14396][BUILD][HOT] Fix compilation against Scala 2.10
#### What changes were proposed in this pull request? This PR is to fix the compilation errors in Scala 2.10 build, as shown in the link: https://amplab.cs.berkeley.edu/jenkins/job/spark-master-compile-maven-scala-2.10/735/console ``` [error] /home/jenkins/workspace/spark-master-compile-maven-scala-2.10/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala:266: value contains is not a member of Option[String] [error] assert(desc.viewText.contains("SELECT * FROM tab1")) [error] ^ [error] /home/jenkins/workspace/spark-master-compile-maven-scala-2.10/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala:267: value contains is not a member of Option[String] [error] assert(desc.viewOriginalText.contains("SELECT * FROM tab1")) [error] ^ [error] /home/jenkins/workspace/spark-master-compile-maven-scala-2.10/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala:293: value contains is not a member of Option[String] [error] assert(desc.viewText.contains("SELECT * FROM tab1")) [error] ^ [error] /home/jenkins/workspace/spark-master-compile-maven-scala-2.10/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala:294: value contains is not a member of Option[String] [error] assert(desc.viewOriginalText.contains("SELECT * FROM tab1")) [error] ^ [error] four errors found [error] Compile failed at Apr 5, 2016 10:59:09 PM [10.502s] ``` #### How was this patch tested? Not sure how to trigger Scala 2.10 compilation in the test environment. Author: gatorsmile <gatorsmile@gmail.com> Closes #12201 from gatorsmile/buildBreak2.10.
Diffstat (limited to 'sql')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala
index b4e5d4adf1..c5f01da4fa 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala
@@ -263,8 +263,8 @@ class HiveDDLCommandSuite extends PlanTest {
assert(desc.tableType == CatalogTableType.VIRTUAL_VIEW)
assert(desc.storage.locationUri.isEmpty)
assert(desc.schema == Seq.empty[CatalogColumn])
- assert(desc.viewText.contains("SELECT * FROM tab1"))
- assert(desc.viewOriginalText.contains("SELECT * FROM tab1"))
+ assert(desc.viewText == Option("SELECT * FROM tab1"))
+ assert(desc.viewOriginalText == Option("SELECT * FROM tab1"))
assert(desc.storage.serdeProperties == Map())
assert(desc.storage.inputFormat.isEmpty)
assert(desc.storage.outputFormat.isEmpty)
@@ -290,8 +290,8 @@ class HiveDDLCommandSuite extends PlanTest {
assert(desc.schema ==
CatalogColumn("col1", null, nullable = true, None) ::
CatalogColumn("col3", null, nullable = true, None) :: Nil)
- assert(desc.viewText.contains("SELECT * FROM tab1"))
- assert(desc.viewOriginalText.contains("SELECT * FROM tab1"))
+ assert(desc.viewText == Option("SELECT * FROM tab1"))
+ assert(desc.viewOriginalText == Option("SELECT * FROM tab1"))
assert(desc.storage.serdeProperties == Map())
assert(desc.storage.inputFormat.isEmpty)
assert(desc.storage.outputFormat.isEmpty)