public Partition getPartition(Table tbl, Map<String, String> partSpec) throws HiveException {
    if (tbl.hasNonNativePartitionSupport()) {
      return tbl.getStorageHandler().getPartition(tbl, partSpec, Context.RewritePolicy.get(conf));
    } else {
      return getPartition(tbl, partSpec, false);
    }
  }
Creates a partition.

@param tbl
         table for which partition needs to be created
@param partSpec
         partition keys and their values
@return created partition object
@throws HiveException
          if table doesn't exist or partition already exists
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java