I've folder on hdfs
/user/test/year=2016/month=04/dt=25/000000_0
Need to add this above partition path to a test table.
command :
ALTER TABLE test ADD IF NOT EXISTS PARTITION (year=2016,month=04,dt=25)
But this add partition command is ignoring the leading zero in the month partition and creates an extra folder inside 2016 as month=4.
/user/test/year=2016/month=04/
/user/test/year=2016/month=4/
and table will be pointed to /user/test/year=2016/month=4/
this path which doesn't contain any data.
I've checked the logs which says
WARN org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer - Partition Spec month=04 has been changed to month=4
Please let me know if anyone faced this kind of issue and how to avoid this?
Hive version is : 1.2.1000