code: @Override
    public Collection<HivePartitionVersion> findDatasetVersions(Dataset dataset)
        throws IOException {
      List<HivePartitionVersion> versions = new ArrayList<>();
      if (!(dataset instanceof HivePartitionDataset)) {
        return versions;
      }
      HivePartitionDataset hivePartitionDataset = (HivePartitionDataset) dataset;
      this.owner = hivePartitionDataset.getOwner();
      Preconditions.checkArgument(!this.patterns.isEmpty(),
          "No patterns to find versions for the dataset " + dataset.datasetURN());
  
      versions
          .addAll(findVersions(hivePartitionDataset.getName(), hivePartitionDataset.datasetURN()));
      return versions;
    }
docs: Will find all the versions of the {@link HivePartitionDataset}.
  
  For a dataset with table name table1, corresponding versions table will be
  table1_backup_timestamp or table1_staging_timestamp or table1_trash_timestamp
  
  Based on pattern, a type of version will be selected eg. backup or trash or staging
  
  If a Hive version's table contain no Partitions, it will be dropped.