private static List<ConstraintInfo> generateConstraintInfos(ASTNode child) throws SemanticException {
    ImmutableList.Builder<String> columnNames = ImmutableList.builder();
    for (int j = 0; j < child.getChild(0).getChildCount(); j++) {
      Tree columnName = child.getChild(0).getChild(j);
      BaseSemanticAnalyzer.checkColumnName(columnName.getText());
      columnNames.add(BaseSemanticAnalyzer.unescapeIdentifier(columnName.getText().toLowerCase()));
    }
    return generateConstraintInfos(child, columnNames.build(), null, null);
  }
Get the constraint from the AST and populate the cstrInfos with the required information.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/constraint/ConstraintsUtils.java