viirya commented on pull request #32404:
URL: https://github.com/apache/spark/pull/32404#issuecomment-833208196


   > > For example, calling a method func(input: Object) with argument Tuple2 
will be disallowed.
   > 
   > This should be allowed, because we do provide the concrete parameter type 
(`Tuple2`). What should be forbidden is something like `func(s: String)` and 
the parameter type is `Object`.
   > 
   > I think I get your point, we should probably use a util function to look 
up the method, instead of writing the code by ourselves, to handle cases like 
search the inheritance hierarchy, argument type casting, etc.
   > 
   > How about 
https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/reflect/MethodUtils.html#getMatchingMethod-java.lang.Class-java.lang.String-java.lang.Class...-
   
   It looks promising. Not aware there is an util function we can use. So my 
question would be should we use it in backports? Or only replacing with our 
code with the util in master only?


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