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


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala:
##########
@@ -142,7 +142,10 @@ 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 => 
ScalaReflection.encoderForWithRowEncoderSupport(tag)),
+      // Output cannot be a row as there is no good way to get the return data 
type.

Review Comment:
   Unless you manually construct it, but let's not get too clever here :)



-- 
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: [email protected]

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