public static Map<String, String> getValidatedPartSpec(Table table, ASTNode astNode,
      HiveConf conf, boolean shouldBeFull) throws SemanticException {
    Map<String, String> partSpec = getPartSpec(astNode);
    if (partSpec != null && !partSpec.isEmpty()) {
      validatePartSpec(table, partSpec, astNode, conf, shouldBeFull);
    }
    return partSpec;
  }
Get the partition specs from the tree.

@param ast
         Tree to extract partitions from.
@return A list of partition name to value mappings.
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java