sadikovi commented on code in PR #38256:
URL: https://github.com/apache/spark/pull/38256#discussion_r995483975


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala:
##########
@@ -75,7 +75,7 @@ trait NamedExpression extends Expression {
    * multiple qualifiers, it is possible that there are other possible way to 
refer to this
    * attribute.
    */
-  def qualifiedName: String = (qualifier :+ name).mkString(".")
+  def qualifiedName: String = (qualifier :+ 
name).map(quoteIfNeeded).mkString(".")

Review Comment:
   I was also thinking about fixing here but I thought that `toSQLId` would 
split the identifier anyway. Could you elaborate on why adding `quoteIfNeeded` 
passes the parsing in `QueryCompilationErrors.unresolvedAttributeError`?
   
   Other than that, looks good. Thanks for adding the tests.



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