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)

Reply via email to