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 ASCII function and groom UT for text functions. #301

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

Yury-Fridlyand
Copy link

Description

Update ASCII function (to return 0 for empty string, see doc)

opensearchsql> select ascii('');
TransportError(503, 'StringIndexOutOfBoundsException', {'error': {'reason': 'There was internal problem at backend', 'details': 'Index 0 out of bounds for length 0', 'type': 'StringIndexOutOfBoundsException'}, 'status': 503})

Update UT for all text functions (similar to #198):

  • remove null/missing tests
  • make tests parametrized

Issues Resolved

N/A

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.

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

❗ No coverage uploaded for pull request base (integ-fix-ascii@f4883c9). Click here to learn what that means.
The diff coverage is n/a.

@@                Coverage Diff                 @@
##             integ-fix-ascii     #301   +/-   ##
==================================================
  Coverage                   ?   97.39%           
  Complexity                 ?     4609           
==================================================
  Files                      ?      401           
  Lines                      ?    11409           
  Branches                   ?      843           
==================================================
  Hits                       ?    11112           
  Misses                     ?      290           
  Partials                   ?        7           
Flag Coverage Δ
sql-engine 97.39% <0.00%> (?)

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

Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand Yury-Fridlyand merged commit de40950 into integ-fix-ascii Jul 21, 2023
14 of 20 checks passed
@Yury-Fridlyand Yury-Fridlyand deleted the dev-fix-ascii branch July 21, 2023 23:33
Yury-Fridlyand added a commit that referenced this pull request Aug 21, 2023
…rch-project#1895)

* Fix `ASCII` function and groom UT for text functions.



* Code cleanup.



---------

Signed-off-by: Yury-Fridlyand <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants