This
I'm pretty sure this only happens when the dataset is truncated. PartitionedFileSetDataset.dropPartition() does have code to drop the partition from explore when it is called explicitly.
However, in the truncate case, we are just delegating to the wrapped dataset admins. So for the partition data, it is just calling HBaseTableAdmin.truncate(). We will need to add a PartitionedFileSetAdmin to implement the truncate properly and drop and recreate the Hive table.
That means the truncate() would have to drop all existing partitions form Hive. That can take quite a long time. It could also disable and re-enable for explore. Not sure whether it is possible to do that from the admin method. Will check.
PR for fix: https://github.com/caskdata/cdap/pull/1760
Build running on branch: http://builds.cask.co/browse/CDAP-RBT204-1
Merged to release/2.8