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

built-in function: Support degrees() function #787

Closed
4 tasks
jingchen2222 opened this issue Nov 26, 2021 · 1 comment · Fixed by #1643
Closed
4 tasks

built-in function: Support degrees() function #787

jingchen2222 opened this issue Nov 26, 2021 · 1 comment · Fixed by #1643
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jingchen2222
Copy link
Collaborator

jingchen2222 commented Nov 26, 2021

Is your feature request related to a problem? Please describe.

degrees(value) - Converts radians to degrees.

Examples:

SELECT degrees(3.141592653589793);
-- output  180.0

reference:
https://dev.mysql.com/doc/refman/8.0/en/mathematical-functions.html#function_degrees
https://spark.apache.org/docs/2.3.0/api/sql/#degrees

Describe the solution you'd like

We do provide a built-in function development guide for you.
Please check OpenMLDB Build-In Function Develop Guide or the Chinese version for help.

Please make sure you:

  • Add built-in C++ function in src/udf/udf.h and src/udf/udf.cc
  • Register function to default library from function void DefaultUdfLibrary::IniMathUdf() in src/udf/default_udf_library.cc.
  • Add related unit test in src/codegen/udf_ir_builder_test.cc
  • Documenting function

If you have any questions or concerns, please let us know. We appreciate every piece of code, comment.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@wuxiaobai24
Copy link
Contributor

I would like to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants