-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23039][SQL] Finish TODO work in alter table set location. #20260
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
Conversation
TOBO work: Fix the bug in alter table set location.
org.apache.spark.sql.execution.command.DDLSuite#testSetLocation
// TODO(gatorsmile): fix the bug in alter table set location.
// if (isUsingHiveMetastore) {
// assert(storageFormat.properties.get("path") === expected)
// }
|
@gatorsmile Please review it. This is your TODO work. Please check it. |
|
ok to test |
|
Test build #86103 has finished for PR 20260 at commit
|
|
I will fix the error of this PR after #20249 (comment) merged |
|
@xubo245 please close this if the other PR supersedes. |
|
This PR is different |
| val tableLocation = getLocationFromStorageProps(table) | ||
| // We pass None as `newPath` here, to remove the path option in storage properties. | ||
| updateLocationInStorageProps(table, newPath = None).copy( | ||
| table.storage.copy( |
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.
In the comments above:
// Internally we store the table location in storage properties with key "path" for data
// source tables. Here we set the table location to `locationUri` field and filter out the
// path option in storage properties, to avoid exposing this concept externally.
// We pass None as `newPath` here, to remove the path option in storage properties.
The property path is removed intentionally.
To finish to a TODO comment in unit test is not a good reason to keep it.
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.
So we should remove the TODO comment/work?
|
Can one of the admins verify this patch? |
|
The |
What changes were proposed in this pull request?
Finish TODO work in alter table set location.
org.apache.spark.sql.execution.command.DDLSuite#testSetLocation
fix it by remove newPath = None in org.apache.spark.sql.hive.HiveExternalCatalog#restoreDataSourceTable
How was this patch tested?
test("SPARK-23039: check path after SET LOCATION")
Wait for #20249