-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CARBONDATA-795]rename table is changing provided db to current db #674
Conversation
Build Failed with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1230/ |
retest this please |
Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1233/ |
0642d26
to
e41f66e
Compare
@@ -174,7 +175,7 @@ private[sql] case class AlterTableRenameTable(alterTableRenameModel: AlterTableR | |||
CarbonEnv.get.carbonMetastore.removeTableFromMetadata(oldDatabaseName, oldTableName) | |||
sparkSession.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client | |||
.runSqlHive( | |||
s"ALTER TABLE $oldDatabaseName.$oldTableName RENAME TO $newTableName") | |||
s"ALTER TABLE $oldDatabaseName.$oldTableName RENAME TO $newDatabaseName.$newTableName") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to oldDatabaseName
Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1237/ |
retest this please |
Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1240/ |
LGTM |
When user trigger rename table command not on current database, table is getting renamed from provided db to current db.
eg., alter table testdb.test1 rename to testdb.test2
Assume current db is default,
Above query is renaming the table from testdb.test1 to default.test2