You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/02 20:04:06 UTC
[GitHub] [spark] brkyvz edited a comment on issue #25206: [SPARK-28265][SQL]
Add renameTable to TableCatalog API
brkyvz edited a comment on issue #25206: [SPARK-28265][SQL] Add renameTable to TableCatalog API
URL: https://github.com/apache/spark/pull/25206#issuecomment-517827869
I'm in favor of being able to rename tables across namespaces. The V2SessionCatalog can reject such an operation (validate that the namespaces match), since the HiveMetaStore wouldn't allow it.
Thinking from a use cases standpoint, I like the example that @mccheah gave around ACLs. Also imagine having an object store catalog. Moving an entire table from `dir1/dir2/abc` to `dir3/abc` would be a valid operation. On HDFS or Azure Data Lake Gen2, these would be very quick operations.
Spark is not an RDBMS therefore I don't see a reason for constricting the functionality to RDBMS behavior as long as the new behavior we're allowing isn't more confusing or could cause users to shoot themselves in the foot.
The kind of use cases I see are:
```sql
ALTER TABLE a RENAME TO b; -- regular RDBMS behavior
ALTER TABLE dev.a RENAME TO prod. -- fail
ALTER TABLE hdfs.dev.a RENAME TO hdfs.prod.a; -- ensure prod is a namespace
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org