LantaoJin commented on a change in pull request #26466: [SPARK-29839][SQL]
Supporting STORED AS in CREATE TABLE LIKE
URL: https://github.com/apache/spark/pull/26466#discussion_r351063829
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
##########
@@ -88,20 +91,35 @@ case class CreateTableLikeCommand(
sourceTableDesc.provider
}
+ val newStorage = if (fileFormat.inputFormat.isDefined) {
+ sourceTableDesc.storage.copy(
Review comment:
So we need to add `ROW FORMAT` in CTL for Hive table only.
Below three cases will create a Hive table:
1. provider set to hive
2. provider is empty but fileFormat is used
3. provider and fileFormat are all unused, source table is hive table
----------------------------------------------------------------
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]