@Override
  public List<Partition> add_partitions(List<Partition> partitions, boolean ifNotExists, boolean needResults)
      throws TException {
    if (partitions == null || partitions.contains(null)) {
      throw new MetaException("Partitions cannot be null");
    }

    if (partitions.isEmpty()) {
      return needResults ? new ArrayList<>() : null;
    }

    List<Partition> addedPartitions = addPartitionsToTempTable(partitions, null, null, ifNotExists);
    if (addedPartitions != null) {
      return needResults ? addedPartitions : null;
    }

    return super.add_partitions(partitions, ifNotExists, needResults);
  }
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