dilipbiswal commented on a change in pull request #26219: [SPARK-29563][SQL] 
CREATE TABLE LIKE should look up catalog/table like v2 commands
URL: https://github.com/apache/spark/pull/26219#discussion_r345064776
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveCatalogs.scala
 ##########
 @@ -141,6 +141,37 @@ class ResolveCatalogs(val catalogManager: CatalogManager)
         writeOptions = c.options.filterKeys(_ != "path"),
         ignoreIfExists = c.ifNotExists)
 
+    case c @ CreateTableLikeStatement(target, source, loc, ifNotExists) =>
+      def validateLocation(loc: Option[String]) = {
+        if (loc.isDefined) {
+          throw new AnalysisException("Location clause not supported for " +
+            "CREATE TABLE LIKE statement when tables are of V2 type")
 
 Review comment:
   @cloud-fan Thanks a lot. I was not aware of this. I will check.

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