GitHub user windpiger opened a pull request:
https://github.com/apache/spark/pull/16700
[SPARK-19359][SQL]clear useless path after rename a partition with
upper-case by HiveExternalCatalog
## What changes were proposed in this pull request?
Hive metastore is not case preserving and keep partition columns with lower
case names.
If SparkSQL create a table with upper-case partion name use
HiveExternalCatalog, when we rename partition, it first call the HiveClient to
renamePartition, which will create a new lower case partition path, then
SparkSql rename the lower case path to the upper-case.
while if the renamed partition contains more than one depth partition ,e.g.
A=1/B=2, hive renamePartition change to a=1/b=2, then SparkSql rename it to
A=1/B=2, but the a=1 still exists in the filesystem, we should also delete it.
## How was this patch tested?
unit test added
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/windpiger/spark
clearUselessPathAfterRenamPartition
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16700.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #16700
----
commit 6a8efddfb44f3f72c15ff6c20cd6ce341bec6da7
Author: windpiger <[email protected]>
Date: 2017-01-25T07:44:20Z
[SPARK-19359][SQL]clear useless path after rename a partition with
upper-case in HiveExternalCatalog
commit 878d45eb81ad9b1b5486689a527c0c2cdfe81b81
Author: windpiger <[email protected]>
Date: 2017-01-25T07:51:07Z
reset a tc
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]