code: public static List<Map<String, String>> getDropPartitionsDDLInfo(Partition hivePartition) {
      List<Map<String, String>> replacedPartitionsDDLInfo = Lists.newArrayList();
      List<FieldSchema> partitionKeys = hivePartition.getTable().getPartitionKeys();
  
      if (StringUtils.isNotBlank(hivePartition.getParameters().get(REPLACED_PARTITIONS_HIVE_METASTORE_KEY))) {
  
        // Partitions are separated by "|"
        for (String partitionsInfoString : Splitter.on("|").omitEmptyStrings().split(hivePartition.getParameters().get(REPLACED_PARTITIONS_HIVE_METASTORE_KEY))) {
  
          // Values for a partition are separated by ","
          List<String> partitionValues = Splitter.on(",").omitEmptyStrings().trimResults().splitToList(partitionsInfoString);
  
          // Do not drop the partition being processed. Sometimes a partition may have replaced another partition of the same values.
          if (!partitionValues.equals(hivePartition.getValues())) {
            ImmutableMap.Builder<String, String> partitionDDLInfoMap = ImmutableMap.builder();
            for (int i = 0; i < partitionKeys.size(); i++) {
              partitionDDLInfoMap.put(partitionKeys.get(i).getName(), partitionValues.get(i));
            }
            replacedPartitionsDDLInfo.add(partitionDDLInfoMap.build());
          }
        }
      }
      return replacedPartitionsDDLInfo;
    }
docs: Parse the {@link #REPLACED_PARTITIONS_HIVE_METASTORE_KEY} from partition parameters to returns DDLs for all the partitions to be
  dropped.
  
  @return A {@link List} of partitions to be dropped. Each element of the list is a {@link Map} which maps a partition's
  key and value.