public List<Partition> getPartitionsViaSqlFilter(String catName, String dbName, String tableName,
      SqlFilterForPushdown filter, boolean isAcidTable,
      GetPartitionsArgs args) throws MetaException {
    List<Long> partitionIds = getPartitionIdsViaSqlFilter(catName,
        dbName, tableName, filter.filter, filter.params,
        filter.joins, args.getMax());

    return getPartitionsByPartitionIdsInBatch(catName, dbName, tableName, partitionIds, 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