hive icon indicating copy to clipboard operation
hive copied to clipboard

HIVE-28676: Support custom partition patterns in MSCK repair table

Open VenkatSNarayanan opened this issue 1 year ago • 8 comments

Adds support for custom partitioning patterns to MSCK repair table.

What changes were proposed in this pull request?

Adds support for custom partitioning patterns to MSCK repair table.

Why are the changes needed?

HCatStorer supports custom partitioning patterns when using dynamic partitioning, but Hive itself does not support this. This change adds support for non-pathological cases to Hive.

Does this PR introduce any user-facing change?

MSCK repair table with a configured custom partition pattern would previously ignore that pattern and error on finding nonstandard paths. With the code from this PR, it will respect the defined custom pattern when it extracts partition key values from the paths.

Is the change a dependency upgrade?

No

How was this patch tested?

A test was added to TestHiveMetastoreChecker to test the common kinds of custom patterns supported.

VenkatSNarayanan avatar Dec 26 '24 22:12 VenkatSNarayanan

@VenkatSNarayanan Please check the failed tests. https://ci.hive.apache.org/blue/organizations/jenkins/hive-precommit/detail/PR-5591/2/tests. Thx

zhangbutao avatar Jan 15 '25 03:01 zhangbutao

@VenkatSNarayanan Please check the failed tests. https://ci.hive.apache.org/blue/organizations/jenkins/hive-precommit/detail/PR-5591/2/tests. Thx

I can't seem to access that page, do I need to do something to see it?

VenkatSNarayanan avatar Jan 21 '25 21:01 VenkatSNarayanan

hive-ci @VenkatSNarayanan you can login in this page by your github account.

zhangbutao avatar Jan 22 '25 01:01 zhangbutao

few tests are failing on Jenkins

org.apache.hadoop.hive.metastore.api.MetastoreException: org.apache.hadoop.hive.metastore.api.MetastoreException: MSCK is missing partition columns under pfile:/home/jenkins/agent/workspace/hive-precommit_PR-5591/ql/target/warehouse/testhivemetastorechecker_db.db/testhivemetastorechecker_table/partdate=2008-01-02/partcity=stockholm
	at org.apache.hadoop.hive.metastore.HiveMetaStoreChecker.checkPartitionDirs(HiveMetaStoreChecker.java:726)

deniskuzZ avatar Mar 23 '25 14:03 deniskuzZ

@deniskuzZ Fixed the MSCK test failures. There is an Iceberg test failure but it seems unrelated to the changes I've made (it complains about some output being too long).

VenkatSNarayanan avatar May 07 '25 22:05 VenkatSNarayanan

re-triggered the build

deniskuzZ avatar May 09 '25 18:05 deniskuzZ

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the [email protected] list if the patch is in need of reviews.

github-actions[bot] avatar Jul 09 '25 00:07 github-actions[bot]

hi @VenkatSNarayanan, please address the review comments and re-open the PR if you are still interested to get this in. Thanks!

deniskuzZ avatar Jul 16 '25 08:07 deniskuzZ