mihailom-db commented on code in PR #46991:
URL: https://github.com/apache/spark/pull/46991#discussion_r1640839040


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/CallMethodViaReflection.scala:
##########
@@ -229,10 +234,13 @@ object CallMethodViaReflection {
       } else {
         // Argument type must match. That is, either the method's argument 
type matches one of the
         // acceptable types defined in typeMapping, or it is a super type of 
the acceptable types.
-        candidateTypes.zip(argTypes).forall { case (candidateType, argType) =>
+        candidateTypes.zip(argTypes).forall { case (candidateType, argType)
+          if !argType.isInstanceOf[StringType] =>
           typeMapping(argType).exists(candidateType.isAssignableFrom)
+        case _ => true

Review Comment:
   Also add test for this case



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