ulysses-you commented on code in PR #36936:
URL: https://github.com/apache/spark/pull/36936#discussion_r909617245


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/identifiers.scala:
##########
@@ -33,15 +36,34 @@ sealed trait IdentifierWithDatabase {
    */
   private def quoteIdentifier(name: String): String = name.replace("`", "``")
 
-  def quotedString: String = {
-    val replacedId = quoteIdentifier(identifier)
-    val replacedDb = database.map(quoteIdentifier(_))
+  def quotedString: String = quotedString(None)
+  def quotedString(catalog: String): String = quotedString(Some(catalog))
 
-    if (replacedDb.isDefined) s"`${replacedDb.get}`.`$replacedId`" else 
s"`$replacedId`"
+  def quotedString(catalog: Option[String]): String = {

Review Comment:
   it is hacky that we access the conf inside identifier that it may appear in 
anywhere. I make a new pr which pull out the config see 
https://github.com/apache/spark/pull/37021 



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