Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

What's Changed in this PR

Documents the COMMENT feature from GreptimeTeam/greptimedb#7060 using the correct COMMENT ON SQL syntax.

Changes

  • New documentation files:
    • Created docs/reference/sql/comment.md documenting the COMMENT ON statement in English
    • Created i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/comment.md with Chinese translation
    • Created versioned_docs/version-1.0/reference/sql/comment.md for version 1.0 (latest stable release)
    • Created i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/comment.md with Chinese translation for version 1.0
  • COMMENT ON TABLE: Added syntax and examples for adding/removing table comments
  • COMMENT ON COLUMN: Added syntax and examples for adding/removing column comments
  • COMMENT ON FLOW: Added syntax and examples for adding/removing flow comments
  • Sidebar updates:
    • Added reference/sql/comment to sidebars.ts in alphabetical order
    • Updated versioned_sidebars/version-1.0-sidebars.json to include comment.md
  • Documentation notes: Included information on viewing comments via SHOW CREATE and INFORMATION_SCHEMA tables

Example Usage

-- Add table comment
COMMENT ON TABLE system_metrics IS 'System monitoring metrics collected every minute';

-- Add column comment
COMMENT ON COLUMN system_metrics.cpu_usage IS 'CPU usage percentage (0-100)';

-- Add flow comment
COMMENT ON FLOW temperature_monitoring IS 'Monitors temperature sensors and alerts on high values';

-- Remove comments (set to NULL)
COMMENT ON TABLE system_metrics IS NULL;
COMMENT ON COLUMN system_metrics.cpu_usage IS NULL;
COMMENT ON FLOW temperature_monitoring IS NULL;

Comments are viewable via SHOW CREATE TABLE/SHOW CREATE FLOW or by querying INFORMATION_SCHEMA.TABLES/INFORMATION_SCHEMA.COLUMNS/INFORMATION_SCHEMA.FLOWS.

Checklist

  • Please confirm that all corresponding versions of the documents have been revised.
  • Please ensure that the content in sidebars.ts matches the current document structure when you changed the document structure.
  • This change requires follow-up update in localized docs.
Original prompt

This section details on the original issue you should resolve

<issue_title>Update docs for feat: table/column/flow COMMENT</issue_title>
<issue_description>A document change request is generated from GreptimeTeam/greptimedb#7060</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 16, 2025

Deploying greptime-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0c35708
Status: ✅  Deploy successful!
Preview URL: https://0e2cb8c6.greptime-docs.pages.dev
Branch Preview URL: https://copilot-update-docs-for-tabl.greptime-docs.pages.dev

View logs

Copilot AI changed the title [WIP] Update documentation for table/column/flow feature Update docs for feat: table/column/flow COMMENT Dec 16, 2025
Copilot AI requested a review from fengjiachun December 16, 2025 10:19
@fengjiachun fengjiachun requested a review from waynexia December 16, 2025 10:50
@waynexia
Copy link
Member

@copilot refer to tests/cases/standalone/common/comment.sql for SQL grammar

Copy link
Contributor Author

Copilot AI commented Dec 17, 2025

@copilot refer to tests/cases/standalone/common/comment.sql for SQL grammar

Fixed in commit 282f509. I reviewed the test file and corrected the documentation to use the actual COMMENT ON TABLE/COLUMN/FLOW IS 'comment' syntax instead of the incorrect ALTER TABLE syntax I initially documented. Created a new docs/reference/sql/comment.md file with proper examples matching the test cases.

Copilot AI changed the title Update docs for feat: table/column/flow COMMENT Add documentation for COMMENT ON statement Dec 17, 2025
@waynexia
Copy link
Member

@copilot add the Chinese doc correspondingly

Copy link
Contributor Author

Copilot AI commented Dec 17, 2025

@copilot add the Chinese doc correspondingly

Added in commit 3761ce2. Created the Chinese documentation at i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/comment.md with translations for all sections including COMMENT ON TABLE, COMMENT ON COLUMN, and COMMENT ON FLOW.

Copilot AI changed the title Add documentation for COMMENT ON statement Add documentation for COMMENT ON statement (English and Chinese) Dec 17, 2025
@fengjiachun fengjiachun changed the title Add documentation for COMMENT ON statement (English and Chinese) docs: add documentation for COMMENT ON statement Dec 18, 2025
@fengjiachun fengjiachun marked this pull request as ready for review December 18, 2025 01:51
@fengjiachun
Copy link
Contributor

@copilot Also need to add the documentation for the latest stable release.

Copy link
Contributor Author

Copilot AI commented Dec 18, 2025

@copilot Also need to add the documentation for the latest stable release.

Added in commit 0c35708. Created both English and Chinese documentation for version 1.0 (latest stable release) at:

  • versioned_docs/version-1.0/reference/sql/comment.md
  • i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/comment.md
  • Updated versioned_sidebars/version-1.0-sidebars.json to include the new documentation.

@fengjiachun fengjiachun marked this pull request as ready for review December 18, 2025 02:17
Copilot AI requested a review from fengjiachun December 18, 2025 02:21
Copy link
Contributor

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@killme2008 killme2008 requested a review from sunng87 December 30, 2025 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update docs for feat: table/column/flow COMMENT

4 participants