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: fix f64 has no sufficient precision during parsing #3483

Merged
merged 1 commit into from Mar 11, 2024

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Mar 11, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

fix #3479

What's changed and what's your intention?

Enable the float_roundtrip of serde_json, it makes f64 -> JSON -> f64 produces output identical to the input.
However, this comes at an approximately 2x performance cost for parsing floats compared to the default best-effort precision.

See also:

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.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Mar 11, 2024
@WenyXu WenyXu requested a review from waynexia March 11, 2024 09:15
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

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

Project coverage is 85.03%. Comparing base (a309cd0) to head (ee4564b).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3483      +/-   ##
==========================================
- Coverage   85.45%   85.03%   -0.43%     
==========================================
  Files         896      897       +1     
  Lines      147532   148153     +621     
==========================================
- Hits       126080   125982      -98     
- Misses      21452    22171     +719     

Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

LCTM

@v0y4g3r v0y4g3r enabled auto-merge March 11, 2024 09:23
@v0y4g3r v0y4g3r added this pull request to the merge queue Mar 11, 2024
Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

@WenyXu where do we rely on f64 to JSON to f64? If it's not on the hot path, the performance issue can be insignificant.

@WenyXu
Copy link
Member Author

WenyXu commented Mar 11, 2024

@WenyXu where do we rely on f64 to JSON to f64? If it's not on the hot path, the performance issue can be insignificant.

The column's default constraint will be serialized into bytes(JSON) when creating the table. However, these changes may also affect the insertion performance.

Merged via the queue into GreptimeTeam:main with commit e767f37 Mar 11, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect default value
4 participants