Hi everyone,

During the implementation of the "describe catalog" syntax, it was
found that the original output style needed to be improved.
```
desc catalog extended cat2;
+--------------------------+---------------------------------------------------------+
| catalog_description_item |
catalog_description_value |
+--------------------------+---------------------------------------------------------+
|                     Name |
         cat2 |
|                     Type |
generic_in_memory |
|                  Comment |
              |
|               Properties | ('default-database','db'),
('type','generic_in_memory') |
+--------------------------+---------------------------------------------------------+
4 rows in set
```
After offline discussions with Jane Chan and Jark Wu, we suggest
improving it to the following form:
```
desc catalog extended cat2;
+-------------------------+-------------------+
|               info name |        info value |
+-------------------------+-------------------+
|                    name |              cat2 |
|                    type | generic_in_memory |
|                 comment |                   |
| option:default-database |                db |
+-------------------------+-------------------+
4 rows in set
```

For the following reasons:
1. The title should be consistent with engines such as Databricks for
easy understanding, and it should also be consistent with Flink's own
naming style. Therefore, the title adopts "info name", "info value",
and the key name should be unified in lowercase, so "Name" is replaced
by "name".
Note: Databricks output style [1] as follows:
```
> DESCRIBE CATALOG main;
 info_name     info_value
 ------------  ------------------------------------
 Catalog Name                                  main
      Comment           Main catalog (auto-created)
        Owner                 metastore-admin-users
 Catalog Type                               Regular
```
2. There may be many attributes of the catalog, and it is very poor in
readability when displayed in one line. It should be expanded into
multiple lines, and the key name is prefixed with "option:" to
identify that this is an attribute row. And since `type` is an
important information of the catalog, even if `extended` is not
specified, it should also be displayed, and correspondingly,
"option:type" should be removed to avoid redundancy.

WDYT? Looking forward to your reply!

[1] 
https://learn.microsoft.com/zh-tw/azure/databricks/sql/language-manual/sql-ref-syntax-aux-describe-catalog

Best,
Yubin

On Wed, Mar 20, 2024 at 2:15 PM Benchao Li <libenc...@apache.org> wrote:
>
> +1 (binding)
>
> gongzhongqiang <gongzhongqi...@apache.org> 于2024年3月20日周三 11:40写道:
> >
> > +1 (non-binding)
> >
> > Best,
> > Zhongqiang Gong
> >
> > Yubin Li <lyb5...@gmail.com> 于2024年3月19日周二 18:03写道:
> >
> > > Hi everyone,
> > >
> > > Thanks for all the feedback, I'd like to start a vote on the FLIP-436:
> > > Introduce Catalog-related Syntax [1]. The discussion thread is here
> > > [2].
> > >
> > > The vote will be open for at least 72 hours unless there is an
> > > objection or insufficient votes.
> > >
> > > [1]
> > > https://cwiki.apache.org/confluence/display/FLINK/FLIP-436%3A+Introduce+Catalog-related+Syntax
> > > [2] https://lists.apache.org/thread/10k1bjb4sngyjwhmfqfky28lyoo7sv0z
> > >
> > > Best regards,
> > > Yubin
> > >
>
>
>
> --
>
> Best,
> Benchao Li

Reply via email to