hive-protolib/src/main/java/com/streamsets/pipeline/stage/lib/hive/HiveQueryExecutor.java
public Set<PartitionInfoCacheSupport.PartitionValues> executeShowPartitionsQuery(String qualifiedTableName) throws StageException {
    String sql = buildShowPartitionsQuery(qualifiedTableName);

    return executeQuery(sql, new WithResultSet<Set<PartitionInfoCacheSupport.PartitionValues>>() {
      @Override
      public Set<PartitionInfoCacheSupport.PartitionValues> run(ResultSet rs) throws SQLException, StageException {
        Set<PartitionInfoCacheSupport.PartitionValues> partitionValuesSet = new HashSet<>();
        while(rs.next()) {
          String partitionInfoString = rs.getString(1);
          String[] partitionInfoSplit = partitionInfoString.split(HiveMetastoreUtil.SEP);
          LinkedHashMap<String, String> vals = new LinkedHashMap<>();
          for (String partitionValInfo : partitionInfoSplit) {
            String[] partitionNameVal = partitionValInfo.split("=");
            vals.put(partitionNameVal[0], partitionNameVal[1]);
          }
          partitionValuesSet.add(new PartitionInfoCacheSupport.PartitionValues(vals));
        }
        return partitionValuesSet;
      }
    });
  }
public Set<PartitionInfoCacheSupport.PartitionValues> executeShowPartitionsQuery(String qualifiedTableName) throws StageException {
    String sql = buildShowPartitionsQuery(qualifiedTableName);

    return executeQuery(sql, new WithResultSet<Set<PartitionInfoCacheSupport.PartitionValues>>() {
      @Override
      public Set<PartitionInfoCacheSupport.PartitionValues> run(ResultSet rs) throws SQLException, StageException {
        Set<PartitionInfoCacheSupport.PartitionValues> partitionValuesSet = new HashSet<>();
        while(rs.next()) {
          String partitionInfoString = rs.getString(1);
          String[] partitionInfoSplit = partitionInfoString.split(HiveMetastoreUtil.SEP);
          LinkedHashMap<String, String> vals = new LinkedHashMap<>();
          for (String partitionValInfo : partitionInfoSplit) {
            String[] partitionNameVal = partitionValInfo.split("=");
            vals.put(partitionNameVal[0], partitionNameVal[1]);
          }
          partitionValuesSet.add(new PartitionInfoCacheSupport.PartitionValues(vals));
        }
        return partitionValuesSet;
      }
    });
  }
Returns {@link Set} of partitions
@param qualifiedTableName qualified table name
@return {@link Set} of partitions
@throws StageException in case of any {@link SQLException}