code: public static String getWhereClauseForPartition(Map<String, String> spec, String prefix) {
      StringBuilder sb = new StringBuilder();
      for (Map.Entry<String, String> entry : spec.entrySet()) {
        if (!sb.toString().isEmpty()) {
          sb.append(" AND ");
        }
        sb.append(prefix + entry.getKey());
        sb.append("=");
        sb.append(PartitionUtils.getQuotedString(entry.getValue()));
      }
      return sb.toString();
    }
docs: This method builds the where clause for the insertion query.
  If prefix is a, then it builds a.datepartition='2016-01-01-00' AND a.size='12345' from [datepartition : '2016-01-01-00', size : '12345']