I have a partitioned table - with 201 partitions. I need to find latest partition in this table and use it to post process my data. The query to find list of all partitions
If you want to avoid running the "show partitions" in hive shell as suggested above, you can apply a filter to your max() query. That will avoid doing a fulltable scan and results should be fairly quick!
select max(ingest_date) from db.table_name
where ingest_date>date_add(current_date,-3) will only scan 2-3 partitions.