public static List<ConstraintKey> getConstraintKeys(
            DatabaseMetaData metadata, TablePath tablePath) throws SQLException {
        // We set approximate to true to avoid querying the statistics table, which is slow.
        try (ResultSet resultSet =
                metadata.getIndexInfo(
                        tablePath.getDatabaseName(),
                        tablePath.getSchemaName(),
                        tablePath.getTableName(),
                        false,
                        true)) {
            // index name -> index
            Map<String, ConstraintKey> constraintKeyMap = new HashMap<>();
            while (resultSet.next()) {
                String columnName = resultSet.getString("COLUMN_NAME");
                if (columnName == null) {
                    continue;
                }
                String indexName = cleanKeyName(resultSet.getString("INDEX_NAME"));
                boolean noUnique = resultSet.getBoolean("NON_UNIQUE");

                ConstraintKey constraintKey =
                        constraintKeyMap.computeIfAbsent(
                                indexName,
                                s -> {
                                    ConstraintKey.ConstraintType constraintType =
                                            ConstraintKey.ConstraintType.INDEX_KEY;
                                    if (!noUnique) {
                                        constraintType = ConstraintKey.ConstraintType.UNIQUE_KEY;
                                    }
                                    return ConstraintKey.of(
                                            constraintType, indexName, new ArrayList<>());
                                });

                ConstraintKey.ColumnSortType sortType =
                        "A".equals(resultSet.getString("ASC_OR_DESC"))
                                ? ConstraintKey.ColumnSortType.ASC
                                : ConstraintKey.ColumnSortType.DESC;
                ConstraintKey.ConstraintKeyColumn constraintKeyColumn =
                        new ConstraintKey.ConstraintKeyColumn(columnName, sortType);
                constraintKey.getColumnNames().add(constraintKeyColumn);
            }
            return new ArrayList<>(constraintKeyMap.values());
        }
    }
@Test
    void testConstraintKeysNameWithOutSpecialChar() throws SQLException {
        List<ConstraintKey> constraintKeys =
                CatalogUtils.getConstraintKeys(
                        new TestDatabaseMetaData(), TablePath.of("test.test"));
        Assertions.assertEquals("testfdawe_", constraintKeys.get(0).getConstraintName());
    }