ganeshashree commented on code in PR #58450:
URL: https://github.com/apache/spark/pull/58450#discussion_r3930714472


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionResolution.scala:
##########
@@ -404,6 +388,87 @@ class FunctionResolution(
     }
   }
 
+  /**
+   * Returns whether an unqualified function name reaches `system.builtin` 
before any temp or
+   * persistent function in the effective SQL PATH. When a temp or persistent 
function shadows the
+   * builtin, special-syntax rewrites (e.g. `count(*) -> count(1)`) must not 
fire, since the name no

Review Comment:
   Unqualified `count(*)` to `count(1)` is normalized earlier in 
`AstBuilder.visitFunctionCall` (documented at 
`FunctionResolverUtils.scala:116`). That predates this PR and isn't touched 
here, so the 101-vs-107 behavior isn't a regression from this change, and 
moving count-star normalization out of the parser would be a separate, 
unrelated semantic change. This PR only refactored matchesFunctionName to reuse 
the shared helper. I have reworded the doc comment, which was misleading: the 
probe governs the routed-JSON bare-* rejection and the `count(tbl.*)` guard, 
not bare `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]

Reply via email to