docs: document widening the time index timestamp unit via ALTER TABLE - #2815
Open
sunng87 wants to merge 1 commit into
Open
docs: document widening the time index timestamp unit via ALTER TABLE#2815sunng87 wants to merge 1 commit into
sunng87 wants to merge 1 commit into
Conversation
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).
Deploying greptime-docs with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed
GreptimeDB now allows
ALTER TABLE ... MODIFY COLUMNto widen the time index column's timestamp unit to a finer one (e.g.TIMESTAMPmilliseconds →TIMESTAMP_USmicroseconds) 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 viaMODIFY COLUMNon 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:linksDOC_LANG=zh pnpm check:links(caught and fixed a zh anchor — the link now uses the Chinese heading anchor#修改列类型)git diff --checkclean; no lockfile or generated-file changes