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

Fix null response from pow/power and added missing integration testing #1457

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

matthewryanwells
Copy link
Contributor

Description

Changed implementation of pow and power such that when an invalid response would be returned from having a negative base and a floating point exponent it returns null instead of crashing.

In addition I also added integration testing which was previously missing.

Issues Resolved

#1190

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.

* Changed pow and power to return null when an invalid response would be returned and added missing integration tests for the pow and power function.

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
@codecov-commenter
Copy link

Codecov Report

Merging #1457 (54aa6e5) into main (4f9f5ca) will increase coverage by 0.06%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #1457      +/-   ##
============================================
+ Coverage     98.39%   98.46%   +0.06%     
- Complexity     3713     3850     +137     
============================================
  Files           343      345       +2     
  Lines          9155     9557     +402     
  Branches        582      615      +33     
============================================
+ Hits           9008     9410     +402     
  Misses          142      142              
  Partials          5        5              
Flag Coverage Δ
sql-engine 98.46% <100.00%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
...ssion/operator/arthmetic/MathematicalFunction.java 100.00% <100.00%> (ø)

... and 30 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.

@Yury-Fridlyand Yury-Fridlyand added the enhancement New feature or request label Mar 21, 2023
@Yury-Fridlyand Yury-Fridlyand merged commit a35f963 into opensearch-project:main Mar 21, 2023
@Yury-Fridlyand Yury-Fridlyand deleted the integ-pow-it branch March 21, 2023 22:57
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 21, 2023
#1457)

* Changed pow and power to return null when an invalid response would be returned and added missing integration tests for the pow and power function.

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
(cherry picked from commit a35f963)
Yury-Fridlyand pushed a commit that referenced this pull request Mar 22, 2023
#1457) (#1459)

* Changed pow and power to return null when an invalid response would be returned and added missing integration tests for the pow and power function.

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
(cherry picked from commit a35f963)

Co-authored-by: Matthew Wells <matthew.wells@improving.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants