cloud-fan commented on a change in pull request #31754:
URL: https://github.com/apache/spark/pull/31754#discussion_r591214947



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala
##########
@@ -159,10 +158,7 @@ case class UnresolvedAttribute(nameParts: Seq[String]) 
extends Attribute with Un
 
   override def toString: String = s"'$name"
 
-  override def sql: String = name match {
-    case ParserUtils.escapedIdentifier(_) | 
ParserUtils.qualifiedEscapedIdentifier(_, _) => name
-    case _ => quoteIdentifier(name)
-  }
+  override def sql: String = nameParts.map(quoteIdentifier(_)).mkString(".")

Review comment:
       since we are touching it, how about we update `quoteIdentifier` to make 
it match `CatalogV2Implicits.quoteIfNeeded`?




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

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