I have a partitioned table in hive. The schema and a sample is shown below
item_id | price | brand | partition_id
AX_12 340.22 Apple. 356
AZ_47 230.00 Samsung 357
AX_12 321.00. Apple. 357
AQ_17. 125.00 Lenovo. 356
If an item is present in multiple partitions. I need to select the row with latest partition So the expected output for this example is this
item_id | price | brand | partition_id
AX_12 321.00 Apple. 357
AZ_47 230.00 Samsung 357
AQ_17. 125.00 Lenovo. 356
There are 10 partitions in the table and each partition has 10 million rows