aboutsummaryrefslogtreecommitdiff
path: root/dev/lint-java
diff options
context:
space:
mode:
authorWenchen Fan <wenchen@databricks.com>2016-10-18 20:23:13 -0700
committerYin Huai <yhuai@databricks.com>2016-10-18 20:23:13 -0700
commit4329c5cea4d235dc582fdb7cbdb822f62e650f5d (patch)
tree3d1d38fd7616b6099b05f6f558755353676f1fa5 /dev/lint-java
parent2629cd74602cfe77188b76428fed62a7a7149315 (diff)
downloadspark-4329c5cea4d235dc582fdb7cbdb822f62e650f5d.tar.gz
spark-4329c5cea4d235dc582fdb7cbdb822f62e650f5d.tar.bz2
spark-4329c5cea4d235dc582fdb7cbdb822f62e650f5d.zip
[SPARK-17873][SQL] ALTER TABLE RENAME TO should allow users to specify database in destination table name(but have to be same as source table)
## What changes were proposed in this pull request? Unlike Hive, in Spark SQL, ALTER TABLE RENAME TO cannot move a table from one database to another(e.g. `ALTER TABLE db1.tbl RENAME TO db2.tbl2`), and will report error if the database in source table and destination table is different. So in #14955 , we forbid users to specify database of destination table in ALTER TABLE RENAME TO, to be consistent with other database systems and also make it easier to rename tables in non-current database, e.g. users can write `ALTER TABLE db1.tbl RENAME TO tbl2`, instead of `ALTER TABLE db1.tbl RENAME TO db1.tbl2`. However, this is a breaking change. Users may already have queries that specify database of destination table in ALTER TABLE RENAME TO. This PR reverts most of #14955 , and simplify the usage of ALTER TABLE RENAME TO by making database of source table the default database of destination table, instead of current database, so that users can still write `ALTER TABLE db1.tbl RENAME TO tbl2`, which is consistent with other databases like MySQL, Postgres, etc. ## How was this patch tested? The added back tests and some new tests. Author: Wenchen Fan <wenchen@databricks.com> Closes #15434 from cloud-fan/revert.
Diffstat (limited to 'dev/lint-java')
0 files changed, 0 insertions, 0 deletions