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

StringIndexOutOfBoundsException for LEFT() and RIGHT()[BUG] #266

Closed
ghost opened this issue Nov 5, 2021 · 2 comments · Fixed by #285
Closed

StringIndexOutOfBoundsException for LEFT() and RIGHT()[BUG] #266

ghost opened this issue Nov 5, 2021 · 2 comments · Fixed by #285
Labels
bug Something isn't working SQL tdvt Tableau test framework

Comments

@ghost
Copy link

ghost commented Nov 5, 2021

Describe the bug
StringIndexOutOfBoundsException is thrown when the second of argument of LEFT and RIGHT functions is greater than the length of the first argument.

Or for query issues:

  1. Run the query 'SELECT LEFT("Hello", 6)'
  2. See error 'StringIndexOutOfBoundsException'

Expected behavior
The output should be the whole string when the second argument is greater than or equal to the length of the string.

Screenshots
image

@ghost ghost added Beta bug Something isn't working untriaged labels Nov 5, 2021
chloe-zh added a commit to chloe-zh/opensearch-sql that referenced this issue Nov 13, 2021
Signed-off-by: chloe-zh <chloezh1102@gmail.com>
@chloe-zh
Copy link
Contributor

Code changes for this fix: #285

@ghost
Copy link
Author

ghost commented Nov 19, 2021

This issue affects TDVT tests:

  • exprtests/standard\setup.string.left.real.txt
  • exprtests/standard\setup.string.left.txt
  • exprtests/standard\setup.string.right.real.txt
  • exprtests/standard\setup.string.endswith.txt
  • exprtests/standard\setup.string.startswith.txt

@joshuali925 joshuali925 added the tdvt Tableau test framework label Nov 24, 2021
acarbonetto added a commit that referenced this issue May 30, 2023
* Create new anonymizer for new engine (#266)

* Created anonymizer listener for anonymizing SQL queries through the new engine
Signed-off-by: Matthew Wells <matthew.wells@improving.com>

* Update for review comments

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* added missing file header, change public variable to private

Signed-off-by: Matthew Wells <matthew.wells@improving.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: Matthew Wells <matthew.wells@improving.com>
Co-authored-by: Andrew Carbonetto <andrewc@bitquilltech.com>
opensearch-trigger-bot bot pushed a commit that referenced this issue May 30, 2023
* Create new anonymizer for new engine (#266)

* Created anonymizer listener for anonymizing SQL queries through the new engine
Signed-off-by: Matthew Wells <matthew.wells@improving.com>

* Update for review comments

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* added missing file header, change public variable to private

Signed-off-by: Matthew Wells <matthew.wells@improving.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: Matthew Wells <matthew.wells@improving.com>
Co-authored-by: Andrew Carbonetto <andrewc@bitquilltech.com>
(cherry picked from commit 62120fd)
opensearch-trigger-bot bot pushed a commit that referenced this issue May 30, 2023
* Create new anonymizer for new engine (#266)

* Created anonymizer listener for anonymizing SQL queries through the new engine
Signed-off-by: Matthew Wells <matthew.wells@improving.com>

* Update for review comments

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* added missing file header, change public variable to private

Signed-off-by: Matthew Wells <matthew.wells@improving.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: Matthew Wells <matthew.wells@improving.com>
Co-authored-by: Andrew Carbonetto <andrewc@bitquilltech.com>
(cherry picked from commit 62120fd)
Yury-Fridlyand pushed a commit that referenced this issue May 30, 2023
* Create new anonymizer for new engine (#266)

* Created anonymizer listener for anonymizing SQL queries through the new engine
Signed-off-by: Matthew Wells <matthew.wells@improving.com>

* Update for review comments

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* added missing file header, change public variable to private

Signed-off-by: Matthew Wells <matthew.wells@improving.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: Matthew Wells <matthew.wells@improving.com>
Co-authored-by: Andrew Carbonetto <andrewc@bitquilltech.com>
(cherry picked from commit 62120fd)

Co-authored-by: Matthew Wells <matthew.wells@improving.com>
acarbonetto pushed a commit that referenced this issue May 30, 2023
* Create new anonymizer for new engine (#266)

* Created anonymizer listener for anonymizing SQL queries through the new engine
Signed-off-by: Matthew Wells <matthew.wells@improving.com>

* Update for review comments

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* added missing file header, change public variable to private

Signed-off-by: Matthew Wells <matthew.wells@improving.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: Matthew Wells <matthew.wells@improving.com>
Co-authored-by: Andrew Carbonetto <andrewc@bitquilltech.com>
(cherry picked from commit 62120fd)

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
bug Something isn't working SQL tdvt Tableau test framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants