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(round): supports decimal place as second parameter #3221

Merged
merged 5 commits into from
Apr 21, 2023

Conversation

aceforeverd
Copy link
Collaborator

Follows the defs in Transact-SQL or SparkSQL.

KeyPoints

  • decimal place can be positive, 0 or negative, indicating the position to decimal point (after, 0, before)
  • return type is same as the first parameter. E.g round(double, ..) -> double, round(int, ..) -> int
  • second parameter can be omitted, default to zero, for backwards compatibility

@github-actions github-actions bot added the execute-engine hybridse sql engine label Apr 16, 2023
@aceforeverd aceforeverd marked this pull request as ready for review April 16, 2023 06:33
@codecov
Copy link

codecov bot commented Apr 16, 2023

Codecov Report

Patch coverage: 82.53% and project coverage change: -3.43 ⚠️

Comparison is base (18710bf) 79.02% compared to head (36f1d58) 75.60%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3221      +/-   ##
============================================
- Coverage     79.02%   75.60%   -3.43%     
- Complexity        0      393     +393     
============================================
  Files           517      678     +161     
  Lines        115991   125425    +9434     
  Branches          0     1180    +1180     
============================================
+ Hits          91662    94827    +3165     
- Misses        24313    30362    +6049     
- Partials         16      236     +220     
Impacted Files Coverage Δ
hybridse/src/udf/default_udf_library.cc 96.98% <72.72%> (-0.28%) ⬇️
hybridse/src/codegen/udf_ir_builder_test.cc 98.83% <82.60%> (-0.77%) ⬇️
hybridse/src/udf/udf.h 98.52% <100.00%> (+0.09%) ⬆️

... and 172 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@aceforeverd aceforeverd linked an issue Apr 17, 2023 that may be closed by this pull request
@aceforeverd aceforeverd merged commit 094087f into 4paradigm:main Apr 21, 2023
@aceforeverd aceforeverd deleted the feat-fn-round branch April 21, 2023 08:19
@lumianph lumianph added the alpha this feature is not fully tested or functional label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha this feature is not fully tested or functional execute-engine hybridse sql engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql: round function
4 participants