You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhenlineo (via GitHub)" <gi...@apache.org> on 2023/06/27 17:44:07 UTC

[GitHub] [spark] zhenlineo commented on a diff in pull request #41704: [SPARK-44161][Connect] Handle Row input for UDFs

zhenlineo commented on code in PR #41704:
URL: https://github.com/apache/spark/pull/41704#discussion_r1244125119


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala:
##########
@@ -142,7 +144,15 @@ object ScalarUserDefinedFunction {
 
     ScalarUserDefinedFunction(
       function = function,
-      inputEncoders = parameterTypes.map(tag => ScalaReflection.encoderFor(tag)),
+      // Input can be a row because the input data schema can be found from the plan.
+      inputEncoders = parameterTypes.map(tag =>

Review Comment:
   Moved. Need to add a new method as not all places the Row encoder conversion should be supported. e.g. The client UDF return encoder cannot be a Row encoder.



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org