Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when desc table-name, the result can not show the comment of field ,can we make an optimization? #50076

Open
lihuafengzi opened this issue Aug 21, 2024 · 2 comments

Comments

@lihuafengzi
Copy link

when desc table-name, the result can not show the comment of field ,can we make an optimization?

image

just show create table can we show the comments, but it's difficult to align left.

image

@danielhumanmod
Copy link
Contributor

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

@danielhumanmod
Copy link
Contributor

danielhumanmod commented Sep 11, 2024

Hi @LiShuMing , I notice you participate in this PR as well, I have a topic want to discuss with you ( Or can you help me to invite the right person StarRocks community to talk about this decision?)

Context

Currently StarRocks doesn't support comment column in DESC statement, but the comment info can be queried with SHOW CREATE TABLE ....

Investigation on other OLAP system

  • Hive
    • DESC Command: Does not show comments.
    • Alternative: Use DESCRIBE FORMATTED to see comments.
  • ClickHouse
    • DESC Command: Does not show comments.
    • Alternative: Use SHOW CREATE TABLE to view comments.
  • Redshift
    • DESC Command: Does not show comments.
    • Alternative: Query pg_catalog to retrieve comments.
  • BigQuery
    • DESC Command: BigQuery does not have a DESCRIBE command. It doesn’t store or display comments as part of the schema.
    • Alternative: Use INFORMATION_SCHEMA to get metadata, but comments are generally not supported in BigQuery.
  • Snowflake
    • DESC Command: Does not show comments.
    • Alternative: Use SHOW COLUMNS to view column comments.
  • Druid
    • DESC Command: Does not support comments.
    • Alternative: Druid does not store column comments in its schema.

Some two-cent idea

Based on these reasons, it might be best not to add comments directly to the DESC output in StarRocks to keep DESC output focus on the essential information like name, type etc.

Instead, our users might consider to use commands like SHOW CREATE TABLE or SHOW COLUMNS for a more comprehensive view of the table, including comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants