@Override
      protected List<String> getSqlResult(GetHelper<List<String>> ctx) throws MetaException {
        SqlFilterForPushdown filter = new SqlFilterForPushdown(ctx.getTable(), false);
        List<String> partNames = null;
        Table table = ctx.getTable();
        if (exprTree != null) {
          if (directSql.generateSqlFilterForPushdown(table.getCatName(), table.getDbName(), table.getTableName(),
              ctx.getTable().getPartitionKeys(), exprTree, defaultPartitionName, filter)) {
            partNames = directSql.getPartitionNamesViaSql(filter, table.getPartitionKeys(),
                defaultPartitionName, order, (int)maxParts);
          }
        }
        if (partNames == null) {
          partNames = getPartNamesPrunedByExpr(table, false);
        }
        return partNames;
      }
Drop an MPartition and cascade deletes (e.g., delete partition privilege grants,
  drop the storage descriptor cleanly, etc.)
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java