code: public static List<String> generateDropPartitionsDDL(final String dbName, final String finalTableName,
        final List<Map<String, String>> partitionDMLInfos) {
  
      if (partitionDMLInfos.isEmpty()) {
        return Collections.emptyList();
      }
  
      List<String> ddls = Lists.newArrayList();
      ddls.add(String.format("USE %s %n", dbName));
      // Join the partition specs
      ddls.add(String.format("ALTER TABLE %s DROP IF EXISTS %s", finalTableName,
          Joiner.on(",").join(Iterables.transform(partitionDMLInfos, PARTITION_SPEC_GENERATOR))));
  
      return ddls;
    }
docs: Generate DDL for dropping partitions of a table.
  <p>
  ALTER TABLE finalTableName DROP IF EXISTS PARTITION partition_spec, PARTITION partition_spec, ...;
  </p>
  @param finalTableName Table name where partitions are dropped
  @param partitionDMLInfos list of Partition to be dropped
  @return DDL to drop partitions in <code>finalTableName</code>