You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "amaliujia (via GitHub)" <gi...@apache.org> on 2023/08/07 16:31:21 UTC

[GitHub] [spark] amaliujia commented on a diff in pull request #42363: [SPARK-44691][SQL][CONNECT] Move Subclasses of AnalysisException to sql/api

amaliujia commented on code in PR #42363:
URL: https://github.com/apache/spark/pull/42363#discussion_r1286129876


##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/StringUtils.scala:
##########
@@ -100,13 +100,7 @@ object SparkStringUtils extends Logging {
     truncatedString(seq, "", sep, "", maxFields)
   }
 
-  def quoteIdentifier(name: String): String = {
-    // Escapes back-ticks within the identifier name with double-back-ticks, and then quote the
-    // identifier with back-ticks.
-    "`" + name.replace("`", "``") + "`"
-  }
-
-  /**
+    /**

Review Comment:
   revert this?



##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/QuotingUtils.scala:
##########
@@ -37,6 +49,18 @@ object QuotingUtils {
     }
   }
 
+  def quoted(namespace: Array[String]): String = {
+    namespace.map(quoteIfNeeded).mkString(".")
+  }
+
+  def quoted(ident: Identifier): String = {

Review Comment:
   Nit: I am wondering if this should be renamed to `quotedIdentifier`. Same for the above which might be `quotedNamespace`?



##########
sql/api/src/main/java/org/apache/spark/sql/connector/catalog/IdentifierImpl.java:
##########
@@ -17,14 +17,14 @@
 
 package org.apache.spark.sql.connector.catalog;
 
+import org.apache.arrow.util.Preconditions;

Review Comment:
   Is this used?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org