private String getJDOFilterStrForPartitionNames(String catName, String dbName, String tblName,
      List<String> partNames, Map params) {
    StringBuilder sb = new StringBuilder("table.tableName == t1 && table.database.name == t2 &&" +
        " table.database.catalogName == t3 && (");
    params.put("t1", normalizeIdentifier(tblName));
    params.put("t2", normalizeIdentifier(dbName));
    params.put("t3", normalizeIdentifier(catName));
    int n = 0;
    for (Iterator<String> itr = partNames.iterator(); itr.hasNext();) {
      String pn = "p" + n;
      n++;
      String part = itr.next();
      params.put(pn, part);
      sb.append("partitionName == ").append(pn);
      sb.append(" || ");
    }
    sb.setLength(sb.length() - 4); // remove the last " || "
    sb.append(')');
    return sb.toString();
  }
Detaches column descriptors from storage descriptors; returns the set of unique CDs
thus detached. This is done before dropping partitions because CDs are reused between
SDs; so, we remove the links to delete SDs and then check the returned CDs to see if
they are referenced by other SDs.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java