cloud-fan commented on issue #25206: [SPARK-28265][SQL] Add renameTable to 
TableCatalog API
URL: https://github.com/apache/spark/pull/25206#issuecomment-517173877
 
 
   Hey, I'm not against the ability to move tables between namespaces, I'm 
against doing this via `RENAME TABLE`. The example of mapping namespaces to 
users and transferring table ownership does make sense, but it's super weird to 
accomplish it by `RENAME TABLE`. I'd expect to see something like `MOVE TABLE t 
FROM ns1 TO ns2`.
   
   I agree with @rdblue about the definition of consistency here. It's OK if 
JDBC always supports DELETE FROM while file source may throw an exception and 
say the delete condition can only refer to partition columns. But the problem 
here is not consistency. It's about if `RENAME TABLE` can change the namespace 
of the table while renaming it. IMO namespace is part of the table identifier 
but not part of the table name.
   
   FYI, in other RDBMS, the parser doesn't even allow you to put a multi-part 
table identifier after `ALTER TABLE ... RENAME TO`. Spark allows it only for 
backward compatibility.

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