public List<Partition> getPartitions(String catName,
      String dbName, String tblName, GetPartitionsArgs args) throws MetaException {
    List<Long> partitionIds = getPartitionIdsViaSqlFilter(catName, dbName,
        tblName, null, Collections.<String>emptyList(), Collections.<String>emptyList(), args.getMax());

    // Get full objects. For Oracle/etc. do it in batches.
    return getPartitionsByPartitionIdsInBatch(catName, dbName, tblName, partitionIds, false, args);
  }
Gets all partitions of a table by using direct SQL queries.
@param catName Metastore catalog name.
@param dbName Metastore db name.
@param tblName Metastore table name.
@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