@Override
  public int add_partitions(List<Partition> partitions) throws TException {
    if (partitions == null || partitions.contains(null)) {
      throw new MetaException("Partitions cannot be null");
    }
    if (partitions.isEmpty()) {
      return 0;
    }

    List<Partition> addedPartitions = add_partitions(partitions, false, true);
    if (addedPartitions != null) {
      return addedPartitions.size();
    }

    return super.add_partitions(partitions);
  }
Loading Dynamic Partitions calls this. The partitions which are loaded, must belong to the
same table.
@param partitions the new partitions to be added, must be not null
@return number of partitions that were added
@throws TException
ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java