Github user viirya commented on a diff in the pull request:
    --- Diff: 
    @@ -1261,8 +1261,24 @@ case class InitializeJavaBean(beanInstance: 
Expression, setters: Map[String, Exp
       override def children: Seq[Expression] = beanInstance +: 
       override def dataType: DataType = beanInstance.dataType
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated 
evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    val instance = beanInstance.eval(input).asInstanceOf[Object]
    +    if (instance != null) {
    +      setters.foreach { case (setterMethod, fieldExpr) =>
    --- End diff --
    This condition `MethodType.methodType(classOf[Unit], fieldClass))` is more 
strict than codegen execution. Codegen execution does not care about return 
type. So the method such as `def add(x$1: Int): Boolean` of 
`java.util.LinkedList.add` can work for codegen version. But it fails the 
method looking here.


To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to