For the following scenario
1. Have partitioned data path as follows.
2. create external table t1 (key int, value string) partitioned by (Year int, Month int, Day int) stored as orc location hdfs://mycluster/datapath/t1'';
3. msck repair table t1;
4. show partitions t1;
5.show table extended like 't1' partition (Year=2020, Month=03, Day=11);
will throw an error:
When the partition directory are created without the extra zeroes, this works fine.
This happens because while searching for partitions, hive strips the extra "0" in month key and then queries the metastore (partSpec="year=2020/month=3/day=10") which returns no rows.