@Override
    public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
        try {
            String sql = "SELECT NULL AS TABLE_CAT, " +
                    "system.tables.database AS TABLE_SCHEM, " +
                    "system.tables.name AS TABLE_NAME, " +
                    "trim(c.1) AS COLUMN_NAME, " +
                    "c.2 AS KEY_SEQ, " +
                    "'PRIMARY' AS PK_NAME " +
                    "FROM system.tables " +
                    "ARRAY JOIN arrayZip(splitByChar(',', primary_key), arrayEnumerate(splitByChar(',', primary_key))) as c " +
                    "WHERE system.tables.primary_key <> '' " +
                    "AND system.tables.database ILIKE '" + (schema == null ? "%" : schema) + "' " +
                    "AND system.tables.name ILIKE '" + (table == null ? "%" : table) + "' " +
                    "ORDER BY COLUMN_NAME";
            log.debug("getPrimaryKeys: %s", sql);
            return connection.createStatement().executeQuery(sql);
        } catch (Exception e) {
            throw ExceptionUtils.toSqlState(e);
        }
    }
Returns name of the ClickHouse table types as the broad category (rather than engine name).
@return - ResultSet with one column TABLE_TYPE
@throws SQLException - if an error occurs
jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java