-
Notifications
You must be signed in to change notification settings - Fork 25k
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
ESQL: LTRIM, RTRIM and fix unicode whitespace #98548
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.
Documentation preview: |
Pinging @elastic/es-ql (Team:QL) |
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL) |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGoodTM, though with some tests on just empty spaces and empty string it would LGreatTM.
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.