diff options
author | Prashant Sharma <prashant.s@imaginea.com> | 2014-07-04 00:05:27 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-07-04 00:05:27 -0700 |
commit | d43415075b3468fe8aa56de5d2907d409bb96347 (patch) | |
tree | 5311c5f32d2035f7eeaab88e1bbfc2d57dafe8b0 /repl/src/test/scala | |
parent | 544880457de556d1ad52e8cb7e1eca19da95f517 (diff) | |
download | spark-d43415075b3468fe8aa56de5d2907d409bb96347.tar.gz spark-d43415075b3468fe8aa56de5d2907d409bb96347.tar.bz2 spark-d43415075b3468fe8aa56de5d2907d409bb96347.zip |
[SPARK-1199][REPL] Remove VALId and use the original import style for defined classes.
This is an alternate solution to #1176.
Author: Prashant Sharma <prashant.s@imaginea.com>
Closes #1179 from ScrapCodes/SPARK-1199/repl-fix-second-approach and squashes the following commits:
820b34b [Prashant Sharma] Here we generate two kinds of import wrappers based on whether it is a class or not.
Diffstat (limited to 'repl/src/test/scala')
-rw-r--r-- | repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala b/repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala index f4ba8d9cc0..f2aa42dbcb 100644 --- a/repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala +++ b/repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala @@ -235,6 +235,18 @@ class ReplSuite extends FunSuite { assertContains("res4: Array[Int] = Array(0, 0, 0, 0, 0)", output) } + test("SPARK-1199-simple-reproduce") { + val output = runInterpreter("local-cluster[1,1,512]", + """ + |case class Sum(exp: String, exp2: String) + |val a = Sum("A", "B") + |def b(a: Sum): String = a match { case Sum(_, _) => "Found Sum" } + |b(a) + """.stripMargin) + assertDoesNotContain("error:", output) + assertDoesNotContain("Exception", output) + } + if (System.getenv("MESOS_NATIVE_LIBRARY") != null) { test("running on Mesos") { val output = runInterpreter("localquiet", |