-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-19048] [SQL] Delete Partition Location when Dropping Managed Partitioned Tables in InMemoryCatalog #16448
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
| * Add Partition in ALTER TABLE: add the table partitions. | ||
| * | ||
| * 'partitionSpecsAndLocs': the syntax of ALTER VIEW is identical to ALTER TABLE, | ||
| * EXCEPT that it is ILLEGAL to specify a LOCATION clause. |
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.
We do not support ALTER VIEW ADD PARTITION
| assert(e.message == "Found duplicate column(s) in table definition of `tbl`: a") | ||
| } | ||
|
|
||
| test("add/drop partition with location - managed table") { |
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.
This is to improve the test coverage of Hive External Catalog.
|
Test build #70776 has finished for PR 16448 at commit
|
|
retest this please |
|
Test build #70784 has finished for PR 16448 at commit
|
|
cc @cloud-fan @yhuai |
| val table = CatalogTable( | ||
| identifier = TableIdentifier("tbl", Some("db1")), | ||
| tableType = CatalogTableType.MANAGED, | ||
| storage = CatalogStorageFormat(None, None, None, None, false, Map.empty), |
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.
nit: CatalogStorageFormat.empty
|
LGTM |
|
Test build #70796 has started for PR 16448 at commit |
|
retest this please |
|
Test build #70817 has finished for PR 16448 at commit
|
…rtitioned Tables in InMemoryCatalog ### What changes were proposed in this pull request? The data in the managed table should be deleted after table is dropped. However, if the partition location is not under the location of the partitioned table, it is not deleted as expected. Users can specify any location for the partition when they adding a partition. This PR is to delete partition location when dropping managed partitioned tables stored in `InMemoryCatalog`. ### How was this patch tested? Added test cases for both HiveExternalCatalog and InMemoryCatalog Author: gatorsmile <[email protected]> Closes #16448 from gatorsmile/unsetSerdeProp. (cherry picked from commit b67b35f) Signed-off-by: gatorsmile <[email protected]>
|
Thanks! Merging to master/2.1 |
…rtitioned Tables in InMemoryCatalog ### What changes were proposed in this pull request? The data in the managed table should be deleted after table is dropped. However, if the partition location is not under the location of the partitioned table, it is not deleted as expected. Users can specify any location for the partition when they adding a partition. This PR is to delete partition location when dropping managed partitioned tables stored in `InMemoryCatalog`. ### How was this patch tested? Added test cases for both HiveExternalCatalog and InMemoryCatalog Author: gatorsmile <[email protected]> Closes apache#16448 from gatorsmile/unsetSerdeProp.
…rtitioned Tables in InMemoryCatalog ### What changes were proposed in this pull request? The data in the managed table should be deleted after table is dropped. However, if the partition location is not under the location of the partitioned table, it is not deleted as expected. Users can specify any location for the partition when they adding a partition. This PR is to delete partition location when dropping managed partitioned tables stored in `InMemoryCatalog`. ### How was this patch tested? Added test cases for both HiveExternalCatalog and InMemoryCatalog Author: gatorsmile <[email protected]> Closes apache#16448 from gatorsmile/unsetSerdeProp.
What changes were proposed in this pull request?
The data in the managed table should be deleted after table is dropped. However, if the partition location is not under the location of the partitioned table, it is not deleted as expected. Users can specify any location for the partition when they adding a partition.
This PR is to delete partition location when dropping managed partitioned tables stored in
InMemoryCatalog.How was this patch tested?
Added test cases for both HiveExternalCatalog and InMemoryCatalog