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

feat: adds interval type docs #1021

Merged
merged 13 commits into from
Jun 26, 2024
Merged

feat: adds interval type docs #1021

merged 13 commits into from
Jun 26, 2024

Conversation

killme2008
Copy link
Contributor

@killme2008 killme2008 commented Jun 24, 2024

What's Changed in this PR

As the title said. Also for GreptimeTeam/greptimedb#4182

And close #486

Checklist

  • Please ensure that the content in summary.yml matches the current document structure when you changed the document structure.
  • This change requires follow-up update in localized docs.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive documentation for a new Interval type to track time durations in GreptimeDB, available in both English and Chinese.
    • Included syntax definitions, usage examples, and manipulation techniques for intervals in SQL queries.

@killme2008 killme2008 requested review from nicecui and a team as code owners June 24, 2024 21:36
@killme2008 killme2008 requested a review from v0y4g3r June 24, 2024 21:36
@killme2008
Copy link
Contributor Author

@v0y4g3r Please take a look.

Copy link

cloudflare-pages bot commented Jun 24, 2024

Deploying greptime-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 81417ef
Status: ✅  Deploy successful!
Preview URL: https://8397d2ab.greptime-docs.pages.dev
Branch Preview URL: https://feature-interval-type.greptime-docs.pages.dev

View logs

Copy link
Contributor

coderabbitai bot commented Jun 24, 2024

Warning

Rate limit exceeded

@nicecui has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 45 minutes and 32 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between c20011b and 81417ef.

Walkthrough

The recent updates to the documentation include the introduction of an Interval type in GreptimeDB. This new data type facilitates the tracking of time durations with precise syntax definitions and practical examples for SQL queries. The changes apply to both the English and Chinese versions of the documentation, detailing how to define, use, and manipulate intervals.

Changes

Files Change Summary
docs/nightly/en/reference/sql/data-types.md Added documentation for the new Interval type, including syntax, usage examples, and manipulation techniques.
docs/nightly/zh/reference/sql/data-types.md Translated documentation for the new Interval type, including syntax, usage examples, and manipulation techniques.

Assessment against linked issues

Objective (Issue #486) Addressed Explanation
Update docs to include new Interval type in SQL data types documentation

Poem

In GreptimeDB, new intervals arise,
For tracking time's flight, a feature so wise.
With clear syntax and examples in view,
Our queries gain power, precision shines through.
Celebrate this change, let's cheers and applaud,
For time in our hands, a whimsical nod.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 754119b and 18d3c36.

Files selected for processing (2)
  • docs/nightly/en/reference/sql/data-types.md (1 hunks)
  • docs/nightly/zh/reference/sql/data-types.md (1 hunks)
Additional context used
LanguageTool
docs/nightly/en/reference/sql/data-types.md

[uncategorized] ~26-~26: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ...8 Bytes | | Float32 | 32-bit IEEE754 floating point values | 4 Bytes | | Float64 | Doubl...


[uncategorized] ~27-~27: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ... Float64 | Double precision IEEE 754 floating point values | 8 Bytes | ## Decimal Type Gr...


[uncategorized] ~77-~77: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...nit [quantity unit...] ``` * quantity: is a number (possibly signed), * `unit...

Additional comments not posted (4)
docs/nightly/zh/reference/sql/data-types.md (2)

66-66: ** Interval Type Introduction**

The addition of the Interval data type with detailed size specifications for each sub-type (YearMonth, DayTime, MonthDayNano) is well-documented and aligns with the PR objectives to introduce this new type.


68-138: ** Detailed Explanation and Examples for Interval Type**

The comprehensive description and examples provided for the Interval type are clear and informative. The examples effectively illustrate how to use the interval type in SQL queries, and the mention of the unsupported ISO 8601 format is a useful note for users.

docs/nightly/en/reference/sql/data-types.md (2)

67-67: ** Interval Type Introduction**

The introduction of the Interval type in the English documentation mirrors the structure and content of the Chinese version, maintaining consistency across localized versions. The detailed byte size specifications for each sub-type are correctly noted.


69-139: ** Detailed Explanation and Examples for Interval Type**

The section on the Interval type in the English documentation is well-written, providing a clear explanation and practical examples. This should help users understand and utilize the Interval type effectively in their SQL queries.

Tools
LanguageTool

[uncategorized] ~77-~77: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...nit [quantity unit...] ``` * quantity: is a number (possibly signed), * `unit...

@etolbakov
Copy link
Contributor

A few minor comments, overall LGTM!

docs/nightly/en/reference/sql/data-types.md Outdated Show resolved Hide resolved
docs/nightly/en/reference/sql/data-types.md Outdated Show resolved Hide resolved
docs/nightly/en/reference/sql/data-types.md Outdated Show resolved Hide resolved
docs/nightly/zh/reference/sql/data-types.md Outdated Show resolved Hide resolved
docs/nightly/zh/reference/sql/data-types.md Outdated Show resolved Hide resolved
killme2008 and others added 8 commits June 25, 2024 09:57
Co-authored-by: Eugene Tolbakov <ev.tolbakov@gmail.com>
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com>
Co-authored-by: Yiran <cuiyiran3@gmail.com>
Co-authored-by: Yiran <cuiyiran3@gmail.com>
Co-authored-by: Yiran <cuiyiran3@gmail.com>
Co-authored-by: Yiran <cuiyiran3@gmail.com>
Co-authored-by: Yiran <cuiyiran3@gmail.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 18d3c36 and c20011b.

Files selected for processing (2)
  • docs/nightly/en/reference/sql/data-types.md (1 hunks)
  • docs/nightly/zh/reference/sql/data-types.md (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • docs/nightly/zh/reference/sql/data-types.md
Additional context used
LanguageTool
docs/nightly/en/reference/sql/data-types.md

[uncategorized] ~26-~26: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ...8 Bytes | | Float32 | 32-bit IEEE754 floating point values | 4 Bytes | | Float64 | Doubl...


[uncategorized] ~27-~27: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ... Float64 | Double precision IEEE 754 floating point values | 8 Bytes | ## Decimal Type Gr...


[uncategorized] ~77-~77: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...NIT [QUANTITY UNIT...] ``` * QUANTITY: is a number (possibly signed), * `UNIT...

Additional comments not posted (2)
docs/nightly/en/reference/sql/data-types.md (2)

71-76: Revise the explanation of the Interval type syntax.

The explanation of how to write the Interval type is clear, but the example provided immediately after the explanation (QUANTITY UNIT [QUANTITY UNIT...]) is in a code block which might lead to confusion as it appears to be a command rather than a syntax pattern.

- ```
- QUANTITY UNIT [QUANTITY UNIT...]
- ```
+ The syntax for writing intervals is as follows: QUANTITY UNIT [QUANTITY UNIT...]

141-153: Validate shorthand forms and signed numbers examples.

The examples for shorthand forms and signed numbers are helpful. However, ensuring that these examples are tested and accurately reflect the output in GreptimeDB would prevent potential user confusion.

docs/nightly/en/reference/sql/data-types.md Show resolved Hide resolved
docs/nightly/en/reference/sql/data-types.md Show resolved Hide resolved
docs/nightly/en/reference/sql/data-types.md Outdated Show resolved Hide resolved
docs/nightly/en/reference/sql/data-types.md Outdated Show resolved Hide resolved
killme2008 and others added 3 commits June 25, 2024 10:05
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@etolbakov etolbakov left a comment

Choose a reason for hiding this comment

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

LGTM

@tisonkun tisonkun merged commit b3758e8 into main Jun 26, 2024
4 checks passed
@tisonkun tisonkun deleted the feature/interval-type branch June 26, 2024 05:21
@tisonkun tisonkun mentioned this pull request Jun 26, 2024
2 tasks
@nicecui nicecui mentioned this pull request Jun 28, 2024
2 tasks
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:impl interval type
5 participants