MSCK REPAIR TABLE is working to add partitions to a table, however I'd also like to remove partitions where they have been removed from the backing datastore.
Supposedly this is supported, as documented here:
MSCK [REPAIR] TABLE table_name [ADD/DROP/SYNC PARTITIONS];
However, this is what I'm seeing:
0: jdbc:hive2://localhost:10000> MSCK REPAIR TABLE my_table DROP PARTITIONS;
Error: Error while compiling statement: FAILED: ParseException line 1:40 missing EOF at 'DROP' near 'my_table' (state=42000,code=40000)
It may be that this is a version issue. We are on 2.3.6 and the ticket for this feature (https://issues.apache.org/jira/browse/HIVE-17824) says the fix version for V2 is 2.4.0. However this version does not appear to exist: https://hive.apache.org/downloads.html (latest is 2.3.7). Is this feature available for Hive V2?