rdblue commented on a change in pull request #25747: [SPARK-29039][SQL] 
centralize the catalog and table lookup logic
URL: https://github.com/apache/spark/pull/25747#discussion_r328288658
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Implicits.scala
 ##########
 @@ -91,11 +92,22 @@ private[sql] object CatalogV2Implicits {
       }
     }
   }
+  implicit class MultiPartIdentifierHelper(nameParts: Seq[String]) {
+    if (nameParts.isEmpty) {
+      throw new AnalysisException("multi-part identifier cannot be empty.")
+    }
+
+    def asIdentifier: Identifier = Identifier.of(nameParts.init.toArray, 
nameParts.last)
 
-  implicit class MultipartIdentifierHelper(parts: Seq[String]) {
-    def quoted: String = parts.map(quote).mkString(".")
+    def asTableIdentifier: TableIdentifier = nameParts match {
 
 Review comment:
   +1, thanks for adding this.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to