srielau commented on code in PR #42888:
URL: https://github.com/apache/spark/pull/42888#discussion_r1323148343


##########
sql/core/src/test/resources/sql-tests/analyzer-results/identifier-clause.sql.out:
##########
@@ -187,10 +187,11 @@ Project [coalesce(cast(null as int), 1) AS coalesce(NULL, 
1)#x]
 
 
 -- !query
-SELECT IDENTIFIER('abs')(-1)
+SELECT IDENTIFIER('abs')(c1) FROM VALUES(-1) AS T(c1)

Review Comment:
   `scala> spark.sql("SELECT IDENTIFIER(:agg)(c1) FROM VALUES(1), (2) AS 
T(c1)", args = Map("agg" -> "max"))
   org.apache.spark.sql.catalyst.ExtendedAnalysisException: 
[UNRESOLVED_COLUMN.WITH_SUGGESTION] A column, variable, or function parameter 
with name `max` cannot be resolved. Did you mean one of the following? [`c1`].; 
line 1 pos 7;
   'Project ['max AS (c1)]
   +- SubqueryAlias T
      +- LocalRelation [c1#0]
   `
   
   It appears to have treated (c1) as an alias!



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