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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/CallMethodViaReflection.scala:
##########
@@ -230,9 +234,12 @@ object CallMethodViaReflection {
         // 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) =>
-          typeMapping(argType).exists(candidateType.isAssignableFrom)
+          if (!argType.isInstanceOf[StringType]) {
+            typeMapping(argType).exists(candidateType.isAssignableFrom)
+          }
+          else candidateType.isAssignableFrom(classOf[String])
         }
       }
     }
   }
-}
+}

Review Comment:
   Please revert this change, so that build can pass scalastyle



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