Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/11178#discussion_r55782510
--- Diff:
tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala ---
@@ -105,16 +109,19 @@ object GenerateMIMAIgnore {
/** Scala reflection does not let us see inner function even if they are
upgraded
* to public for some reason. So had to resort to java reflection to
get all inner
- * functions with $$ in there name.
+ * functions with $$ in their name.
*/
- def getInnerFunctions(classSymbol: unv.ClassSymbol): Seq[String] = {
+ def getInnerFunctions(className: String): Seq[String] = {
try {
- Class.forName(classSymbol.fullName, false,
classLoader).getMethods.map(_.getName)
- .filter(_.contains("$$")).map(classSymbol.fullName + "." + _)
--- End diff --
In addition to the reformatting here, I also changed `classSymbol.fullName`
to `className`. The problem is that `classSymbol.fullName` uses underscores
instead of dollar signs when denoting inner classes and had some other
weirdness, so the old name was causing `ClassNotFoundException` when it was
passed to `Class.forName`. This caused the flood of `"Unable to detect inner
functions" warnings in the MiMa logs, e.g.
```
[WARN] Unable to detect inner functions for
class:org.apache.spark.sql.catalyst.parser.SparkSqlParser_FromClauseParser.partitionTableFunctionSource_return
[WARN] Unable to detect inner functions for
class:org.apache.spark.sql.api.r.SQLUtils.RegexContext
[WARN] Unable to detect inner functions for
class:org.apache.spark.sql.catalyst.parser.SparkSqlParser_ExpressionParser.$DFA21
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]