public List<Map<String, String>> getPartitionSpecs(Table tbl, CommonTree ast)
      throws SemanticException {
    List<Map<String, String>> partSpecs = new ArrayList<>();
    // get partition metadata if partition specified
    for (int childIndex = 0; childIndex < ast.getChildCount(); childIndex++) {
      ASTNode partSpecNode = (ASTNode)ast.getChild(childIndex);
      // sanity check
      if (partSpecNode.getType() == HiveParser.TOK_PARTSPEC) {
        Map<String, String> partSpec = getValidatedPartSpec(tbl, partSpecNode, conf, false);
        partSpecs.add(partSpec);
      }
    }
    return partSpecs;
  }
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