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


##########
sql/core/src/test/scala/org/apache/spark/sql/SetPathSuite.scala:
##########
@@ -937,9 +937,9 @@ class SetPathSuite extends SharedSparkSession {
 
   test("path-driven COUNT(*) rewrite gate: temp count shadowing builtin under 
SET PATH " +
       "(session-first) suppresses the * -> 1 rewrite") {
-    // `Analyzer.matchesFunctionName` consults
-    // `FunctionResolution.isSessionBeforeBuiltinInPath` to decide whether 
COUNT(*) is the
-    // builtin (eligible for the COUNT(*) -> COUNT(1) shortcut) or a 
user-defined override.
+    // `Analyzer.matchesFunctionName` consults 
`FunctionResolution.functionNameResolvesToBuiltin`

Review Comment:
   Right, SQL `count(*)` is normalized to `count(1)` in AstBuilder, so that 
case never reached the gate. Switched the single-pass test to a retained-star 
DataFrame `count("*")` over a non-1 input, so builtin-first collapses to 
`count(1)` (BIGINT) and session-first expands the star and hits the temp SQL 
function (ExplicitlyUnsupportedResolverFeature). Also reworded the fixed-point 
SQL test's name and comments so it no longer claims owner-probe coverage; it 
just checks that the parser-normalized `count(1)` resolves via PATH.



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