Skip to content

Conversation

@margarit-h
Copy link
Contributor

@margarit-h margarit-h commented Nov 23, 2022

  • Add cbrt function to the PPL

Signed-off-by: Margarit Hakobyan [email protected]

Description

Calculates the cube root of a number

Argument type: INTEGER/LONG/FLOAT/DOUBLE

Return type DOUBLE:

(Non-negative) INTEGER/LONG/FLOAT/DOUBLE -> DOUBLE
(Negative) INTEGER/LONG/FLOAT/DOUBLE -> DOUBLE

Example::

opensearchsql> source=location | eval `CBRT(8)` = CBRT(8), `CBRT(9.261)` = CBRT(9.261), `CBRT(-27)` = CBRT(-27) | fields `CBRT(8)`, `CBRT(9.261)`,`CBRT(-27)`;
fetched rows / total rows = 2/2
+-----------+---------------+-------------+
| CBRT(8)   | CBRT(9.261)   | CBRT(-27)   |
|-----------+---------------+-------------|
| 2.0       | 2.1           | -3.0        |
| 2.0       | 2.1           | -3.0        |
+-----------+---------------+-------------+

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

* Add cbrt function to the PPL

Signed-off-by: Margarit Hakobyan <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.78%. Comparing base (d4d289c) to head (77de5e5).
⚠️ Report is 474 commits behind head on 2.x.

❌ Your project status has failed because the head coverage (95.78%) is below the target coverage (99.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #1097      +/-   ##
============================================
- Coverage     98.28%   95.78%   -2.51%     
- Complexity     3454     3465      +11     
============================================
  Files           345      357      +12     
  Lines          8588     9305     +717     
  Branches        547      669     +122     
============================================
+ Hits           8441     8913     +472     
- Misses          142      334     +192     
- Partials          5       58      +53     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 98.29% <ø> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Margarit Hakobyan <[email protected]>
Signed-off-by: Margarit Hakobyan <[email protected]>
Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

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

Thanks for the changes!

@Yury-Fridlyand Yury-Fridlyand merged commit e2bf254 into opensearch-project:2.x Nov 28, 2022
@Yury-Fridlyand Yury-Fridlyand deleted the integ-add-cbrt-to-ppl branch November 28, 2022 19:08
@dai-chen dai-chen added enhancement New feature or request PPL Piped processing language labels Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PPL Piped processing language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants