You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "Kevin (Sangwoo) Kim (JIRA)" <ji...@apache.org> on 2017/02/09 01:03:41 UTC

[jira] [Created] (ZEPPELIN-2085) Zeppelin fails to compile function contains function as a parameter

Kevin (Sangwoo) Kim created ZEPPELIN-2085:
---------------------------------------------

             Summary: Zeppelin fails to compile function contains function as a parameter
                 Key: ZEPPELIN-2085
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-2085
             Project: Zeppelin
          Issue Type: Bug
    Affects Versions: 0.7.0
            Reporter: Kevin (Sangwoo) Kim


Code below runs well in Spark shell, 
but fails to run on Zeppelin 0.7 (Used to be work on Zeppelin 0.6)

====

case class TestClass(a: Int)
object TestClassBuilder {
  def get(a: Int) = TestClass(a)
}

def successToCompile()(filterFunc: (TestClass) => Boolean) {

  val rdd = sc.makeRDD(List(TestClass(1), TestClass(2)))    
  rdd.filter(filterFunc)
}

def failToCompile(filterFunc: (TestClass) => Boolean) {

  val rdd = sc.makeRDD(List(TestClassBuilder.get(1), TestClassBuilder.get(2)))    
  rdd.filter(filterFunc)
}




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)