Skip to content

docs: document widening the time index timestamp unit via ALTER TABLE - #2815

Open
sunng87 wants to merge 1 commit into
mainfrom
docs/alter-widen-time-index-unit
Open

docs: document widening the time index timestamp unit via ALTER TABLE#2815
sunng87 wants to merge 1 commit into
mainfrom
docs/alter-widen-time-index-unit

Conversation

@sunng87

@sunng87 sunng87 commented Sep 3, 2026

Copy link
Copy Markdown
Member

What's changed

GreptimeDB now allows ALTER TABLE ... MODIFY COLUMN to widen the time index column's timestamp unit to a finer one (e.g. TIMESTAMP milliseconds → TIMESTAMP_US microseconds) on non-metric-engine tables (greptimedb #8894). This PR updates the docs that previously stated the time index could not be modified at all:

  • reference/sql/alter.md (Modify column type): field columns still can't be tags and must be nullable; the time index is now the documented exception — widening is allowed (with example), is lossless (existing data is read in the new unit without rewriting), while narrowing, non-timestamp targets, and metric engine tables remain unsupported.
  • user-guide/.../basic-table-operations.md: the warning now says the TIME INDEX column can't be moved to another column, but its timestamp unit can be widened via MODIFY COLUMN on non-metric-engine tables, linking to the ALTER reference anchor.
  • faq-and-others/faq.md: the "Can I change a column's type after table creation?" answer drops "or time index" and adds the widening exception with an example.

English (docs/, nightly) and Chinese (i18n/zh/.../current/) updated together with equivalent meaning. No released-version changes since the feature is unreleased.

Checklist

  • DOC_LANG=en pnpm check:links
  • DOC_LANG=zh pnpm check:links (caught and fixed a zh anchor — the link now uses the Chinese heading anchor #修改列类型)
  • git diff --check clean; no lockfile or generated-file changes

GreptimeDB now allows MODIFY COLUMN to widen the time index column's
timestamp unit to a finer one (e.g. TIMESTAMP ms -> TIMESTAMP_US) on
non-metric-engine tables. Update the ALTER reference, basic table
operations guide, and FAQ in both English and Chinese: the time index
is no longer rejected outright for MODIFY COLUMN; narrowing and
non-timestamp targets remain disallowed, and the change is lossless
(existing data is read in the new unit without rewriting).
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying greptime-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: bd07c3b
Status: ✅  Deploy successful!
Preview URL: https://4a8e3fae.greptime-docs.pages.dev
Branch Preview URL: https://docs-alter-widen-time-index.greptime-docs.pages.dev

View logs

@fengjiachun fengjiachun left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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.

2 participants