-
Notifications
You must be signed in to change notification settings - Fork 37
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
docs: add docs for the merge_mode option #1061
Conversation
WalkthroughThe recent updates to GreptimeDB documentation introduce a new feature called Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GreptimeDB
User->>GreptimeDB: Create Table with append_mode and merge_mode
Note over GreptimeDB: Validate append_mode and merge_mode
GreptimeDB-->>User: Table Created
User->>GreptimeDB: Insert Data
Note over GreptimeDB: Check for duplicate primary key and timestamp
alt append_mode is false
alt merge_mode is last_row
GreptimeDB-->>User: Keep the last row
else merge_mode is last_non_null
GreptimeDB-->>User: Keep the last non-null field
end
else append_mode is true
GreptimeDB-->>User: Keep duplicate rows
end
Possibly related issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
docs/nightly/en/reference/sql/compatibility.md (1)
12-12
: Fix grammatical error.Add a comma after "option" to improve readability.
- * GreptimeDB supports [merge mode](/reference/sql/create#create-an-append-only-table) that creates a table with `merge_mode="last_non_null"` option which allow updating a field partially. + * GreptimeDB supports [merge mode](/reference/sql/create#create-an-append-only-table) that creates a table with `merge_mode="last_non_null"` option, which allows updating a field partially.Tools
LanguageTool
[uncategorized] ~12-~12: Possible missing comma found.
Context: ...table withmerge_mode="last_non_null"
option which allow updating a field partially....(AI_HYDRA_LEO_MISSING_COMMA)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- docs/nightly/en/reference/sql/compatibility.md (1 hunks)
- docs/nightly/en/reference/sql/create.md (2 hunks)
Additional context used
LanguageTool
docs/nightly/en/reference/sql/compatibility.md
[uncategorized] ~12-~12: Possible missing comma found.
Context: ...table withmerge_mode="last_non_null"
option which allow updating a field partially....(AI_HYDRA_LEO_MISSING_COMMA)
Additional comments not posted (3)
docs/nightly/en/reference/sql/create.md (3)
101-101
: LGTM!The description of the
append_mode
option is clear and accurate.
102-102
: LGTM!The description of the
merge_mode
option is clear and accurate.
153-211
: LGTM!The examples for creating tables with different
merge_mode
settings are clear and well-structured.
Deploying greptime-docs with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- docs/nightly/zh/reference/sql/compatibility.md (1 hunks)
- docs/nightly/zh/reference/sql/create.md (2 hunks)
Files skipped from review due to trivial changes (1)
- docs/nightly/zh/reference/sql/compatibility.md
Additional context used
LanguageTool
docs/nightly/zh/reference/sql/create.md
[uncategorized] ~172-~172: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:最新"地"行
Context: ...st_row');在 `last_row` 模式下,表会通过保留最新的行来合并具有相同主键和时间戳的行。
sql INSERT INTO me...(wb4)
Additional comments not posted (4)
docs/nightly/zh/reference/sql/create.md (4)
103-103
: LGTM! Verify the consistency of the description.The updated description for
append_mode
correctly reflects the new behavior withmerge_mode
. Ensure that similar descriptions in other parts of the documentation are consistent.
104-104
: LGTM! Verify the accuracy of the description.The added description for
merge_mode
is clear and accurately describes the new feature. Ensure that the behavior matches the implementation.
155-186
: LGTM! Verify the examples and explanations.The new section for creating tables with
merge_mode
is clear and provides useful examples. Ensure that the examples are accurate and match the expected behavior.Tools
LanguageTool
[uncategorized] ~172-~172: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:最新"地"行
Context: ...st_row');在 `last_row` 模式下,表会通过保留最新的行来合并具有相同主键和时间戳的行。
sql INSERT INTO me...(wb4)
189-218
: LGTM! Verify the example's accuracy.The new example for creating tables with
merge_mode
set tolast_non_null
is clear and provides a useful demonstration. Ensure that the example is accurate and matches the expected behavior.
Co-authored-by: Yiran <cuiyiran3@gmail.com>
What's Changed in this PR
This PR adds docs for the newly added
merge_mode
table option.Checklist
summary.yml
matches the current document structure when you changed the document structure.Summary by CodeRabbit
New Features
merge_mode
for table creation in GreptimeDB, allowing partial field updates and enhanced data duplication management.last_row
andlast_non_null
to manage duplicate rows in tables withappend_mode
.Documentation
merge_mode
functionality and its impact on table creation syntax.