Skip to content

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

Closed

Description

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

Activity

  1. ghost added on Nov 5, 2021
  2. ghost added
    bug
    on Nov 5, 2021
  3. added a commit that references this issue on Nov 13, 2021
    0cf5c8a
  4. chloe-zh commented on Nov 13, 2021

    @chloe-zh
    Contributor

    Code changes for this fix: #285

  5. added
    tdvt
    on Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SQLbugtdvt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions