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(fronted): cotd implementation #9259

Merged
merged 9 commits into from
Apr 24, 2023
Merged

feat(fronted): cotd implementation #9259

merged 9 commits into from
Apr 24, 2023

Conversation

CAJan93
Copy link
Contributor

@CAJan93 CAJan93 commented Apr 18, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Implement the COTD function. This implementation is slightly different from the PSQL implementation. I do not return an error on COTD(Inf), but instead return NaN.

Checklist For Contributors

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

  • My PR DOES NOT contain user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

COTD: An implementation of the cotangent in degrees.

@CAJan93 CAJan93 marked this pull request as ready for review April 19, 2023 08:36
@CAJan93 CAJan93 requested review from xiangjinwu and lmatz April 19, 2023 08:36
Comment on lines +63 to +66
static SIND_30: f64 = 0.499_999_999_999_999_94;
static ONE_MINUS_COSD_60: f64 = 0.499_999_999_999_999_9;
static TAND_45: f64 = 1.0;
static COTD_45: f64 = 1.0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed these to make sure that we are talking about degrees and not radians

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Merging #9259 (dab8a39) into main (a504f0e) will increase coverage by 0.00%.
The diff coverage is 98.14%.

@@           Coverage Diff           @@
##             main    #9259   +/-   ##
=======================================
  Coverage   70.81%   70.81%           
=======================================
  Files        1228     1228           
  Lines      203786   203838   +52     
=======================================
+ Hits       144304   144349   +45     
- Misses      59482    59489    +7     
Flag Coverage Δ
rust 70.81% <98.14%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/frontend/src/expr/pure.rs 94.73% <ø> (ø)
src/expr/src/vector_op/trigonometric.rs 97.48% <98.11%> (+1.39%) ⬆️
src/frontend/src/binder/expr/function.rs 89.63% <100.00%> (+0.01%) ⬆️

... and 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@lmatz lmatz left a comment

Choose a reason for hiding this comment

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

LGTM

@lmatz lmatz enabled auto-merge April 24, 2023 08:16
@lmatz lmatz added this pull request to the merge queue Apr 24, 2023
Merged via the queue into main with commit ccfb492 Apr 24, 2023
@lmatz lmatz deleted the cotd branch April 24, 2023 08:28
@neverchanje neverchanje added the user-facing-changes Contains changes that are visible to users label May 9, 2023
@CharlieSYH CharlieSYH added the 📖✓ Covered or will be covered in the user docs. label May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature user-facing-changes Contains changes that are visible to users 📖✓ Covered or will be covered in the user docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants