gengliangwang commented on code in PR #53570:
URL: https://github.com/apache/spark/pull/53570#discussion_r2718221228
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1828,23 +1879,33 @@ class Analyzer(
case _ => false
}
+ /**
+ * Checks if the given function name parts match the expected unqualified
function name,
+ * regardless of whether it's qualified or not.
+ * Handles: "count", "builtin.count", "system.builtin.count",
"session.count", etc.
+ */
+ private def matchesFunctionName(nameParts: Seq[String], expectedName:
String): Boolean = {
+ nameParts.lastOption.exists(_.equalsIgnoreCase(expectedName))
Review Comment:
Let's also check the other name parts. Otherwise `foo.bar.count` is also
valid
--
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]