Add CBRT to the V2 engine#166
Merged
margarit-h merged 5 commits intointeg-add-cbrt-to-v2from Nov 16, 2022
Merged
Conversation
Signed-off-by: Margarit Hakobyan <margarith@bitquilltech.com>
Codecov Report
@@ Coverage Diff @@
## integ-add-cbrt-to-v2 #166 +/- ##
==========================================================
- Coverage 98.27% 95.71% -2.56%
- Complexity 3351 3355 +4
==========================================================
Files 327 337 +10
Lines 8457 9123 +666
Branches 553 672 +119
==========================================================
+ Hits 8311 8732 +421
- Misses 142 334 +192
- Partials 4 57 +53
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Yury-Fridlyand
suggested changes
Nov 15, 2022
core/src/main/java/org/opensearch/sql/expression/operator/arthmetic/MathematicalFunction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Margarit Hakobyan <margarith@bitquilltech.com>
acarbonetto
reviewed
Nov 15, 2022
| * Test cbrt with long value. | ||
| */ | ||
| @ParameterizedTest(name = "cbrt({0})") | ||
| @ValueSource(longs = {1L, 2L}) |
There was a problem hiding this comment.
we could also test negative longs, and larger-than-2 longs
| * Test cbrt with int value. | ||
| */ | ||
| @ParameterizedTest(name = "cbrt({0})") | ||
| @ValueSource(ints = {1, 2}) |
| * Test cbrt with float value. | ||
| */ | ||
| @ParameterizedTest(name = "cbrt({0})") | ||
| @ValueSource(floats = {1F, 2F}) |
There was a problem hiding this comment.
negative floats, or floats with more precision?
| * Test cbrt with double value. | ||
| */ | ||
| @ParameterizedTest(name = "cbrt({0})") | ||
| @ValueSource(doubles = {1D, 2D}) |
There was a problem hiding this comment.
larger doubles, doubles with values below the decimal?
Signed-off-by: Margarit Hakobyan <margarith@bitquilltech.com>
Signed-off-by: Margarit Hakobyan <margarith@bitquilltech.com>
MaxKsyunz
approved these changes
Nov 15, 2022
GumpacG
approved these changes
Nov 16, 2022
forestmvey
approved these changes
Nov 16, 2022
acarbonetto
approved these changes
Nov 16, 2022
margarit-h
added a commit
that referenced
this pull request
Nov 17, 2022
margarit-h
added a commit
that referenced
this pull request
Nov 17, 2022
Signed-off-by: Margarit Hakobyan <margarith@bitquilltech.com>
margarit-h
added a commit
that referenced
this pull request
Nov 17, 2022
Signed-off-by: Margarit Hakobyan <margarith@bitquilltech.com>
margarit-h
added a commit
that referenced
this pull request
Nov 21, 2022
* Add CBRT to the V2 engine (#166) Signed-off-by: Margarit Hakobyan <margarith@bitquilltech.com> * Fixes after rebase Signed-off-by: Margarit Hakobyan <margarith@bitquilltech.com> Signed-off-by: Margarit Hakobyan <margarith@bitquilltech.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Margarit Hakobyan margarith@bitquilltech.com
Description
Adds CBRT() math function to the V2 engine.
Usage: CBRT(number) 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::
Issues Resolved
[List any issues this PR will resolve]
Check List
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.