Ngone51 commented on a change in pull request #28979:
URL: https://github.com/apache/spark/pull/28979#discussion_r450268964



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala
##########
@@ -102,6 +105,28 @@ case class ScalaUDF(
     }
   }
 
+  /**
+   * Create the converter which converts the scala data type to the catalyst 
data type for
+   * the return data type of udf function. We'd use `ExpressionEncoder` to 
create the
+   * converter for typed ScalaUDF only, since its the only case where we know 
the  type tag
+   * of the return data type of udf function.
+   * @param dataType return type of function
+   * @return the catalyst converter
+   */
+  private def catalystConverter(dataType: DataType): Any => Any = {

Review comment:
       ok




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to