ESQL: LTRIM, RTRIM and fix unicode whitespace#98548
Closed
nik9000 wants to merge 2 commits intoelastic:feature/esqlfrom
Closed
ESQL: LTRIM, RTRIM and fix unicode whitespace#98548nik9000 wants to merge 2 commits intoelastic:feature/esqlfrom
nik9000 wants to merge 2 commits intoelastic:feature/esqlfrom
Conversation
Here we add support for the following two ESQL functions: * LTRIM: remove leading spaces from a string * RTRIM: remove trailing spaces from a string We also fix an issue with the handling of unicode white spaces. We make use of unicode code points to identify unicode whitespace characters instead of relying on ASCII codes. Moreover, iterating bytes in a Unicode string needs to consider that some Unicode characters are encoded using multiple bytes.
Contributor
|
Documentation preview: |
Collaborator
|
Pinging @elastic/es-ql (Team:QL) |
Collaborator
|
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL) |
Member
Author
|
This is work originally done by @salvatore-campagna against the original ESQL repo. He didn't get to merge it before he stepped out for a while so I've modernized it and will land it here. |
bpintea
approved these changes
Aug 17, 2023
Contributor
bpintea
left a comment
There was a problem hiding this comment.
LGoodTM, though with some tests on just empty spaces and empty string it would LGreatTM.
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.
Here we add support for the following two ESQL functions:
We also fix an issue with the handling of unicode white spaces. We make use of unicode code points to identify unicode whitespace characters instead of relying on ASCII codes.
Moreover, iterating bytes in a Unicode string needs to consider that some Unicode characters are encoded using multiple bytes.