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

Specify the floating point accuracy of the round() function #3178

Merged
merged 10 commits into from
Nov 3, 2021

Conversation

jackwener
Copy link
Contributor

@jackwener jackwener commented Oct 21, 2021

Related Issue

close #3105

What is changed and how it works?

According to the discussion in cppreference

The implementation of round() in source code of python

Note

  • Need to add test
  • Find the implementation in python round()

@jackwener jackwener added the wip Solution: work in progress label Oct 21, 2021
@jackwener jackwener added ready-for-testing PR: ready for the CI test and removed wip Solution: work in progress labels Oct 22, 2021
@jackwener jackwener requested a review from Sophie-Xie October 22, 2021 07:09
@jackwener jackwener changed the title [WIP]: Specify the floating point accuracy of the round() function Specify the floating point accuracy of the round() function Oct 25, 2021
@jackwener jackwener added ready-for-testing PR: ready for the CI test and removed ready-for-testing PR: ready for the CI test labels Oct 25, 2021
@jackwener jackwener added ready-for-testing PR: ready for the CI test and removed ready-for-testing PR: ready for the CI test labels Oct 26, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2021

Codecov Report

Merging #3178 (6cfc857) into master (21a3ffb) will increase coverage by 0.01%.
The diff coverage is 93.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3178      +/-   ##
==========================================
+ Coverage   85.21%   85.23%   +0.01%     
==========================================
  Files        1295     1295              
  Lines      118198   118198              
==========================================
+ Hits       100728   100744      +16     
+ Misses      17470    17454      -16     
Impacted Files Coverage Δ
src/common/function/FunctionManager.cpp 79.70% <85.71%> (+0.16%) ⬆️
src/common/function/test/FunctionManagerTest.cpp 98.80% <100.00%> (+0.01%) ⬆️
src/meta/processors/BaseProcessor.h 75.67% <0.00%> (-16.22%) ⬇️
src/common/algorithm/ReservoirSampling.h 90.90% <0.00%> (-9.10%) ⬇️
src/common/thrift/ThriftClientManager-inl.h 82.97% <0.00%> (-6.39%) ⬇️
src/parser/GraphScanner.h 91.46% <0.00%> (-2.29%) ⬇️
src/common/utils/IndexKeyUtils.h 89.68% <0.00%> (-0.57%) ⬇️
src/storage/mutate/AddEdgesProcessor.cpp 56.66% <0.00%> (-0.34%) ⬇️
src/kvstore/wal/FileBasedWal.cpp 71.80% <0.00%> (-0.24%) ⬇️
src/clients/storage/GraphStorageClient.cpp 76.34% <0.00%> (-0.20%) ⬇️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21a3ffb...6cfc857. Read the comment docs.

nevermore3
nevermore3 previously approved these changes Oct 28, 2021
Copy link
Contributor

@jievince jievince left a comment

Choose a reason for hiding this comment

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

Well Done!
Neo4j also supports round(), with precision and rounding mode, will we support it too? https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-round3

@Sophie-Xie Sophie-Xie removed their request for review October 28, 2021 06:26
@jackwener
Copy link
Contributor Author

@nevermore3 @jievince PTAL

Copy link
Contributor

@jievince jievince left a comment

Choose a reason for hiding this comment

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

LGTM

@yixinglu yixinglu merged commit 07ccfde into vesoft-inc:master Nov 3, 2021
@Sophie-Xie Sophie-Xie added the doc affected PR: improvements or additions to documentation label Jan 4, 2022
@jackwener jackwener deleted the round branch January 18, 2022 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc affected PR: improvements or additions to documentation ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

specify the floating point accuracy of the round() function
6 participants