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

    https://github.com/apache/spark/pull/20797#discussion_r177487244
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
 ---
    @@ -266,8 +266,31 @@ case class Invoke(
       override def nullable: Boolean = targetObject.nullable || needNullCheck 
|| returnNullable
       override def children: Seq[Expression] = targetObject +: arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated 
evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    --- End diff --
    
    Since `obj` should be evaluated at each call of `eval`, it is hard to reuse 
method resolution logic in `StaticInvoke`. On the other hand, we can reuse 
logic for casting a return value.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to