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

fix!: use the right precision #3794

Merged
merged 7 commits into from
Apr 25, 2024

Conversation

fengjiachun
Copy link
Collaborator

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

Use the right precision.

Before: The data written with Influxdb line protocol before was stored as type Millisecond, resulting in loss of precision.
After: The data written with influxes line protocol and OTLP protocol will be stored as type "Nanosecond"

Note that this is a breaking change because the data storage type has changed from Millisecond to Nanosecond. For existing tables, new writes will result in an error. One solution is to delete the data and re-import it.

Others:

  1. Remove writer.rs and line_writer.rs since we do not need them any more(There were for column protocol)
  2. Add more unit test

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@fengjiachun fengjiachun requested a review from a team as a code owner April 24, 2024 09:09
@github-actions github-actions bot added breaking-change This pull request contains breaking changes. docs-not-required This change does not impact docs. labels Apr 24, 2024
@killme2008
Copy link
Contributor

Don't forget comments for pub functions/structures.

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 83.03030% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 85.25%. Comparing base (e0b5f52) to head (d0f4f23).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3794      +/-   ##
==========================================
- Coverage   85.56%   85.25%   -0.32%     
==========================================
  Files         947      946       -1     
  Lines      161503   161142     -361     
==========================================
- Hits       138198   137384     -814     
- Misses      23305    23758     +453     

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM

src/common/grpc/src/precision.rs Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change This pull request contains breaking changes. docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants