Github user maropu commented on a diff in the pull request: https://github.com/apache/spark/pull/20778#discussion_r173382375 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala --- @@ -392,8 +392,44 @@ case class NewInstance( childrenResolved && !needOuterPointer } - override def eval(input: InternalRow): Any = - throw new UnsupportedOperationException("Only code-generated evaluation is supported.") + private lazy val constructor: (Seq[AnyRef]) => Any = { + val paramTypes = arguments.map { expr => + CallMethodViaReflection.typeMapping.getOrElse(expr.dataType, + Seq(expr.dataType.asInstanceOf[ObjectType].cls)) + } + val findConstructor = (types: Seq[Seq[Class[_]]]) => { + val constructorOption = cls.getConstructors.find { c => --- End diff -- ok, I'll re-check.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org