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_r350031120
##########
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:
In current spark implementation, we don't have any opportunity to set
`compressed=true`. So I think it's ok to just use the source's compressed
property.
For `fileFormat.properties`, it's a little tricky, could wen use
`sourceTableDesc.storage.properties ++ properties`?
How about this?
Before:
CatalogTable.properties always uses empty
CatalogTable.storage.properties always uses source table's storage.properties
After:
CatalogTable.properties always uses TBLPROPERTIES if user set, or empty.
CatalogTable.storage.properties always uses source table's
storage.properties ++ TBLPROPERTIES if user set.
----------------------------------------------------------------
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]