Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/993#discussion_r15331132
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUdf.scala
 ---
    @@ -29,6 +29,7 @@ case class ScalaUdf(function: AnyRef, dataType: DataType, 
children: Seq[Expressi
     
       override def eval(input: Row): Any = {
         children.size match {
    +      case 0 => function.asInstanceOf[() => Any]()
    --- End diff --
    
    this is for another time, but if you add an explicitly init to expressions, 
we can move all of these branches from the inner loop (once per row) directly 
to the outer loop (once per partition).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to