starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

support user defined comments for catalog

Open shawn0915 opened this issue 2 years ago • 3 comments

Feature request

Is your feature request related to a problem? Please describe.

创建catalog:

StarRocks> CREATE EXTERNAL CATALOG mysql_catalog
    -> PROPERTIES
    -> (
    ->     "type"="JDBC",
    ->     "user"="root",
    ->     "password"="root",
    ->     "jdbc_uri"="jdbc:mysql://localhost:3306",
    ->     "driver_url"="file:///tmp/mysql-connector-java-8.0.30.jar",
    ->     "driver_class"="com.mysql.cj.jdbc.Driver",
    -> "Comment"="MySQL Catalog"
    -> );
Query OK, 0 rows affected (0.02 sec)

但是不支持自定义 comment?

StarRocks> SHOW CATALOGS;
+-----------------+----------+------------------------------------------------------------------+
| Catalog         | Type     | Comment                                                          |
+-----------------+----------+------------------------------------------------------------------+
| default_catalog | Internal | An internal catalog contains this cluster's self-managed tables. |
| mysql_catalog   | JDBC     | NULL                                                             |
+-----------------+----------+------------------------------------------------------------------+
2 rows in set (0.00 sec)

Describe the solution you'd like

Describe alternatives you've considered

Additional context

shawn0915 avatar Sep 09 '24 01:09 shawn0915

Hi @shawn0915 , I can take a look and support this feature

danielhumanmod avatar Sep 11 '24 04:09 danielhumanmod

Hi @shawn0915 , you can add user defined comment directly by CREATE EXTERNAL CATALOG [catalog_name] COMMENT [custom_comment] instead of putting them in properties.

The full syntax is: (Reference)

CREATE EXTERNAL CATALOG [IF NOT EXISTS] <catalog_name>
[COMMENT <comment>]
PROPERTIES ("key"="value", ...)

danielhumanmod avatar Sep 11 '24 22:09 danielhumanmod

We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!

github-actions[bot] avatar Mar 17 '25 11:03 github-actions[bot]