aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/src/test/scala/org/apache
diff options
context:
space:
mode:
authorVijay Ramesh <vramesh@demandbase.com>2017-04-09 19:39:09 +0100
committerSean Owen <sowen@cloudera.com>2017-04-09 19:39:09 +0100
commit261eaf5149a8fe479ab4f9c34db892bcedbf5739 (patch)
treee086e6fe7cd0f180e0751220506916a89b09c0c7 /sql/hive/src/test/scala/org/apache
parent1f0de3c1c85a41eadc7c4131bdc948405f340099 (diff)
downloadspark-261eaf5149a8fe479ab4f9c34db892bcedbf5739.tar.gz
spark-261eaf5149a8fe479ab4f9c34db892bcedbf5739.tar.bz2
spark-261eaf5149a8fe479ab4f9c34db892bcedbf5739.zip
[SPARK-20260][MLLIB] String interpolation required for error message
## What changes were proposed in this pull request? This error message doesn't get properly formatted because of a missing `s`. Currently the error looks like: ``` Caused by: java.lang.IllegalArgumentException: requirement failed: indices should be one-based and in ascending order; found current=$current, previous=$previous; line="$line" ``` (note the literal `$current` instead of the interpolated value) Please review http://spark.apache.org/contributing.html before opening a pull request. Author: Vijay Ramesh <vramesh@demandbase.com> Closes #17572 from vijaykramesh/master.
Diffstat (limited to 'sql/hive/src/test/scala/org/apache')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcQuerySuite.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcQuerySuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcQuerySuite.scala
index 5d8ba9d7c8..8c855730c3 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcQuerySuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcQuerySuite.scala
@@ -285,7 +285,7 @@ class OrcQuerySuite extends QueryTest with BeforeAndAfterAll with OrcTest {
val queryOutput = selfJoin.queryExecution.analyzed.output
assertResult(4, "Field count mismatches")(queryOutput.size)
- assertResult(2, "Duplicated expression ID in query plan:\n $selfJoin") {
+ assertResult(2, s"Duplicated expression ID in query plan:\n $selfJoin") {
queryOutput.filter(_.name == "_1").map(_.exprId).size
}
@@ -294,7 +294,7 @@ class OrcQuerySuite extends QueryTest with BeforeAndAfterAll with OrcTest {
}
test("nested data - struct with array field") {
- val data = (1 to 10).map(i => Tuple1((i, Seq("val_$i"))))
+ val data = (1 to 10).map(i => Tuple1((i, Seq(s"val_$i"))))
withOrcTable(data, "t") {
checkAnswer(sql("SELECT `_1`.`_2`[0] FROM t"), data.map {
case Tuple1((_, Seq(string))) => Row(string)
@@ -303,7 +303,7 @@ class OrcQuerySuite extends QueryTest with BeforeAndAfterAll with OrcTest {
}
test("nested data - array of struct") {
- val data = (1 to 10).map(i => Tuple1(Seq(i -> "val_$i")))
+ val data = (1 to 10).map(i => Tuple1(Seq(i -> s"val_$i")))
withOrcTable(data, "t") {
checkAnswer(sql("SELECT `_1`[0].`_2` FROM t"), data.map {
case Tuple1(Seq((_, string))) => Row(string)