-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
SQL: Allow whitespaces in escape patterns #47577
Conversation
Pinging @elastic/es-search (:Search/SQL) |
I'm considering to backport it to earlier versions too, more like a fix. |
Previously, we supported only the format `{fn <FUNCTION_NAME>()}` but other DBs like MSSQL, DB2, MariaDB/MySQL alos allow whitespaces between `{` and `fn`. Furhermore, also some applications - like PowerBI - generate escape sequences with spaces: `select { fn name(params) } etc.` Add support for white spaces between `{` and the escape pattern definition like `fn`, `ts`, `d`, `guid` etc. Closes: elastic#47401
There is another possibility to refactor the grammar like this: https://github.com/matriv/elasticsearch/compare/impl-47401...matriv:refactor-grammar?expand=1#diff-14b1f1a74854b9993f46da9467f6abcb so that we avoid the explicit Personally I prefer the solution as is currently in the PR, which distinguishes the |
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.
LGTM
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.
LGTM
@costin what's your opinion on this ^ ? |
@elasticmachine run elasticsearch-ci/packaging-sample |
Previously, we supported only the format `{fn <FUNCTION_NAME>()}` but other DBs like MSSQL, DB2, MariaDB/MySQL alos allow whitespaces between `{` and `fn`. Furhermore, also some applications - like PowerBI - generate escape sequences with spaces: `select { fn name(params) } etc.` Add support for white spaces between `{` and the escape pattern definition like `fn`, `ts`, `d`, `guid` etc. Closes: #47401 (cherry picked from commit 08a22d0)
Previously, we supported only the format `{fn <FUNCTION_NAME>()}` but other DBs like MSSQL, DB2, MariaDB/MySQL alos allow whitespaces between `{` and `fn`. Furhermore, also some applications - like PowerBI - generate escape sequences with spaces: `select { fn name(params) } etc.` Add support for white spaces between `{` and the escape pattern definition like `fn`, `ts`, `d`, `guid` etc. Closes: #47401 (cherry picked from commit 08a22d0)
Previously, we supported only the format `{fn <FUNCTION_NAME>()}` but other DBs like MSSQL, DB2, MariaDB/MySQL alos allow whitespaces between `{` and `fn`. Furhermore, also some applications - like PowerBI - generate escape sequences with spaces: `select { fn name(params) } etc.` Add support for white spaces between `{` and the escape pattern definition like `fn`, `ts`, `d`, `guid` etc. Closes: #47401 (cherry picked from commit 08a22d0)
Previously, we supported only the format
{fn <FUNCTION_NAME>()}
but other DBs like MSSQL, DB2, MariaDB/MySQL alos allow whitespaces
between
{
andfn
. Furhermore, also some applications - like PowerBI -generate escape sequences with spaces:
select { fn name(params) } etc.
Add support for white spaces between
{
and the escape pattern definitionlike
fn
,ts
,d
,guid
etc.Closes: #47401