sarutak commented on a change in pull request #31754:
URL: https://github.com/apache/spark/pull/31754#discussion_r600994076



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala
##########
@@ -347,8 +348,9 @@ case class AttributeReference(
   }
 
   override def sql: String = {
-    val qualifierPrefix = if (qualifier.nonEmpty) qualifier.mkString(".") + 
"." else ""
-    s"$qualifierPrefix${quoteIdentifier(name)}"
+    val qualifierPrefix =
+      if (qualifier.nonEmpty) qualifier.map(quoteIfNeeded).mkString(".") + "." 
else ""
+    s"$qualifierPrefix${quoteIfNeeded(name)}"

Review comment:
       The first idea of mine was always adding backticks but finally I used 
`quoteIfNeeded` after discussion.
   We might need to quote none of alphabets, numbers, underscore.
   Or, do you think it's better to always quote ?




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