gengliangwang commented on code in PR #53570:
URL: https://github.com/apache/spark/pull/53570#discussion_r2688989153
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/resolver/FunctionResolver.scala:
##########
@@ -172,11 +170,11 @@ class FunctionResolver(
/**
* Method used to determine whether the given function should be replaced
with another one.
+ * Handles qualified function names (e.g., "count", "builtin.count",
"system.builtin.count").
*/
private def isCount(unresolvedFunction: UnresolvedFunction): Boolean = {
!unresolvedFunction.isDistinct &&
- unresolvedFunction.nameParts.length == 1 &&
- unresolvedFunction.nameParts.head.toLowerCase(Locale.ROOT) == "count"
+ unresolvedFunction.nameParts.lastOption.exists(_.equalsIgnoreCase("count"))
Review Comment:
what if the input is "foo.bar.count"?
--
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]