public static List<UniqueConstraint> parse(String defaultCatalogName, String defaultDbName,
                                               String defaultTableName, String constraintDescs) {
        if (Strings.isNullOrEmpty(constraintDescs)) {
            return null;
        }
        String[] constraintArray = constraintDescs.split(";");
        List<UniqueConstraint> uniqueConstraints = Lists.newArrayList();
        for (String constraintDesc : constraintArray) {
            if (Strings.isNullOrEmpty(constraintDesc)) {
                continue;
            }
            Pair<TableName, List<String>> descResult = parseUniqueConstraintDesc(
                    defaultCatalogName, defaultDbName, defaultTableName, constraintDesc);
            uniqueConstraints.add(new UniqueConstraint(descResult.first.getCatalog(),
                    descResult.first.getDb(), descResult.first.getTbl(),
                    descResult.second.stream().map(ColumnId::create).collect(Collectors.toList())));
        }
        return uniqueConstraints;
    }
@Test
    public void testParseException() {
        String constraintDescs = "hive_catalog.db1.table1.col1, col2, hive_catalog.db1.table2.col3";
        exception.expect(SemanticException.class);
        exception.expectMessage("unique constraint column should be in same table");
        UniqueConstraint.parse(null, null, null, constraintDescs);
    }