cloud-fan 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_r345304495
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
 ##########
 @@ -187,6 +187,16 @@ case class CreateTableAsSelect(
   }
 }
 
+/**
+ * Create a new table with the same table definition of the source table.
+ */
+case class CreateTableLike(
+    targetCatalog: TableCatalog,
+    targetTableName: Seq[String],
+    sourceCatalog: Option[TableCatalog],
+    sourceTableName: Seq[String],
 
 Review comment:
   the v1 table has a v2 adapter called `V1Table`. In `ResolveCatalogs`, we can 
lookup table from session catalog, create a `DataSourceV2Relation`, and pass it 
into `CreateTableLike`.

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