public List<Partition> getPartitionsViaSqlPs(Table table, GetPartitionsArgs args) throws MetaException {
    String catName = table.getCatName();
    String dbName = table.getDbName();
    String tblName = table.getTableName();

    String sqlFilter = "" + PARTITIONS + ".\"PART_NAME\" like ? ";
    String partialName = MetaStoreUtils.makePartNameMatcher(table, args.getPart_vals(), "_%");
    List<Long> partitionIds = getPartitionFieldsViaSqlFilter(
        catName, dbName, tblName, Arrays.asList("\"PART_ID\""), sqlFilter,
        Arrays.asList(partialName), Collections.emptyList(), args.getMax());
    if (partitionIds.isEmpty()) {
      return Collections.emptyList(); // no partitions, bail early.
    }
    boolean isAcidTable = TxnUtils.isAcidTable(table);
    return Batchable.runBatched(batchSize, partitionIds, new Batchable<Long, Partition>() {
      @Override
      public List<Partition> run(List<Long> input) throws MetaException {
        return getPartitionsByPartitionIds(catName, dbName, tblName, input, isAcidTable, args);
      }
    });
  }
Gets partitions by using direct SQL queries.
@param filter The filter.
@param isAcidTable True if the table is ACID
@param args additional arguments for getting partitions
@return List of partitions.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java