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

ESQL: Disable quoting in FROM command #108431

Merged
merged 3 commits into from
May 9, 2024

Conversation

costin
Copy link
Member

@costin costin commented May 8, 2024

Disable location quoting in FROM command before 8.14 release to allow
more time to discuss options

Disable location quoting in FROM command before 8.14 release to allow
 more time to discuss options
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label May 8, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Collaborator

Hi @costin, I've created a changelog YAML for you.

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@costin costin added the auto-backport-and-merge Automatically create backport pull requests and merge when ready label May 9, 2024
@costin costin merged commit e56ed71 into elastic:main May 9, 2024
15 checks passed
@costin costin deleted the esql/disable-from-quoting branch May 9, 2024 00:13
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.14 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 108431

costin added a commit to costin/elasticsearch that referenced this pull request May 9, 2024
Disable location quoting in FROM command before 8.14 release to allow
 more time to discuss options

(cherry picked from commit e56ed71)
elasticsearchmachine pushed a commit that referenced this pull request May 9, 2024
Disable location quoting in FROM command before 8.14 release to allow
 more time to discuss options

(cherry picked from commit e56ed71)
drewdaemon added a commit to elastic/kibana that referenced this pull request May 9, 2024
## Summary

The Kibana version of
elastic/elasticsearch#108431

Removes support for quoted index names. 

Valid:
`from my_index`

Invalid
`from "my_index"`

<img width="514" alt="Screenshot 2024-05-08 at 2 10 24 PM"
src="https://github.com/elastic/kibana/assets/315764/f76f9128-cc13-41df-b885-b1ec30fe7ca3">
<img width="711" alt="Screenshot 2024-05-08 at 2 10 17 PM"
src="https://github.com/elastic/kibana/assets/315764/651c0480-ddcd-4f2b-ba05-862b3ca8a402">
drewdaemon added a commit to drewdaemon/kibana that referenced this pull request May 9, 2024
## Summary

The Kibana version of
elastic/elasticsearch#108431

Removes support for quoted index names.

Valid:
`from my_index`

Invalid
`from "my_index"`

<img width="514" alt="Screenshot 2024-05-08 at 2 10 24 PM"
src="https://github.com/elastic/kibana/assets/315764/f76f9128-cc13-41df-b885-b1ec30fe7ca3">
<img width="711" alt="Screenshot 2024-05-08 at 2 10 17 PM"
src="https://github.com/elastic/kibana/assets/315764/651c0480-ddcd-4f2b-ba05-862b3ca8a402">

(cherry picked from commit 34502a9)

# Conflicts:
#	packages/kbn-esql-ast/src/antlr/esql_lexer.interp
#	packages/kbn-esql-ast/src/antlr/esql_lexer.ts
#	packages/kbn-esql-ast/src/antlr/esql_parser.interp
#	packages/kbn-esql-ast/src/antlr/esql_parser.ts
drewdaemon added a commit to elastic/kibana that referenced this pull request May 9, 2024
# Backport

This will backport the following commits from `main` to `8.14`:
- [[ES|QL] remove quoted index name support
(#182994)](#182994)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Drew
Tate","email":"drew.tate@elastic.co"},"sourceCommit":{"committedDate":"2024-05-09T03:51:50Z","message":"[ES|QL]
remove quoted index name support (#182994)\n\n## Summary\r\n\r\nThe
Kibana version
of\r\nhttps://github.com/elastic/elasticsearch/pull/108431\r\n\r\nRemoves
support for quoted index names. \r\n\r\nValid:\r\n`from
my_index`\r\n\r\nInvalid\r\n`from \"my_index\"`\r\n\r\n<img
width=\"514\" alt=\"Screenshot 2024-05-08 at 2 10
24 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/315764/f76f9128-cc13-41df-b885-b1ec30fe7ca3\">\r\n<img
width=\"711\" alt=\"Screenshot 2024-05-08 at 2 10
17 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/315764/651c0480-ddcd-4f2b-ba05-862b3ca8a402\">","sha":"34502a9253a9505889ec2a923cc0a08a624868de","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","Feature:ES|QL","v8.14.0","Team:ESQL","v8.15.0"],"number":182994,"url":"https://github.com/elastic/kibana/pull/182994","mergeCommit":{"message":"[ES|QL]
remove quoted index name support (#182994)\n\n## Summary\r\n\r\nThe
Kibana version
of\r\nhttps://github.com/elastic/elasticsearch/pull/108431\r\n\r\nRemoves
support for quoted index names. \r\n\r\nValid:\r\n`from
my_index`\r\n\r\nInvalid\r\n`from \"my_index\"`\r\n\r\n<img
width=\"514\" alt=\"Screenshot 2024-05-08 at 2 10
24 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/315764/f76f9128-cc13-41df-b885-b1ec30fe7ca3\">\r\n<img
width=\"711\" alt=\"Screenshot 2024-05-08 at 2 10
17 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/315764/651c0480-ddcd-4f2b-ba05-862b3ca8a402\">","sha":"34502a9253a9505889ec2a923cc0a08a624868de"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/182994","number":182994,"mergeCommit":{"message":"[ES|QL]
remove quoted index name support (#182994)\n\n## Summary\r\n\r\nThe
Kibana version
of\r\nhttps://github.com/elastic/elasticsearch/pull/108431\r\n\r\nRemoves
support for quoted index names. \r\n\r\nValid:\r\n`from
my_index`\r\n\r\nInvalid\r\n`from \"my_index\"`\r\n\r\n<img
width=\"514\" alt=\"Screenshot 2024-05-08 at 2 10
24 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/315764/f76f9128-cc13-41df-b885-b1ec30fe7ca3\">\r\n<img
width=\"711\" alt=\"Screenshot 2024-05-08 at 2 10
17 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/315764/651c0480-ddcd-4f2b-ba05-862b3ca8a402\">","sha":"34502a9253a9505889ec2a923cc0a08a624868de"}}]}]
BACKPORT-->
dgieselaar added a commit to elastic/kibana that referenced this pull request May 9, 2024
There were some last minute changes to ES|QL that will ship in 8.14 that
we need to take into account:

- [BUCKET is now an aggregation
function](elastic/elasticsearch#107272)
- [index names can no longer be escaped with backticks
](elastic/elasticsearch#108431)

I'm also including a change that translates `=` to `==` in WHERE
commands, and more useful error messages (map a syntax error to the
command where it occurred).

As BUCKET is often used for timeseries data and we replaced single and
double quotes around index names with backticks, this introduces a high
chance of generating syntactically invalid queries. This PR updates the
docs and examples and removes the correction from `"` and `'` to "`"
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 9, 2024
)

There were some last minute changes to ES|QL that will ship in 8.14 that
we need to take into account:

- [BUCKET is now an aggregation
function](elastic/elasticsearch#107272)
- [index names can no longer be escaped with backticks
](elastic/elasticsearch#108431)

I'm also including a change that translates `=` to `==` in WHERE
commands, and more useful error messages (map a syntax error to the
command where it occurred).

As BUCKET is often used for timeseries data and we replaced single and
double quotes around index names with backticks, this introduces a high
chance of generating syntactically invalid queries. This PR updates the
docs and examples and removes the correction from `"` and `'` to "`"

(cherry picked from commit 6004cad)
kibanamachine added a commit to elastic/kibana that referenced this pull request May 9, 2024
) (#183037)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Obs AI Assistant] Remove ES|QL escaping for index names
(#183028)](#183028)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dario
Gieselaar","email":"dario.gieselaar@elastic.co"},"sourceCommit":{"committedDate":"2024-05-09T12:15:34Z","message":"[Obs
AI Assistant] Remove ES|QL escaping for index names (#183028)\n\nThere
were some last minute changes to ES|QL that will ship in 8.14 that\r\nwe
need to take into account:\r\n\r\n- [BUCKET is now an
aggregation\r\nfunction](elastic/elasticsearch#107272
[index names can no longer be escaped with
backticks\r\n](elastic/elasticsearch#108431
also including a change that translates `=` to `==` in
WHERE\r\ncommands, and more useful error messages (map a syntax error to
the\r\ncommand where it occurred).\r\n\r\nAs BUCKET is often used for
timeseries data and we replaced single and\r\ndouble quotes around index
names with backticks, this introduces a high\r\nchance of generating
syntactically invalid queries. This PR updates the\r\ndocs and examples
and removes the correction from `\"` and `'` to
\"`\"","sha":"6004cad53af71564b756e116b6b769a9d595dad6","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Obs
AI
Assistant","ci:project-deploy-observability","v8.14.0","v8.15.0"],"title":"[Obs
AI Assistant] Remove ES|QL escaping for index
names","number":183028,"url":"#183028
AI Assistant] Remove ES|QL escaping for index names (#183028)\n\nThere
were some last minute changes to ES|QL that will ship in 8.14 that\r\nwe
need to take into account:\r\n\r\n- [BUCKET is now an
aggregation\r\nfunction](elastic/elasticsearch#107272
[index names can no longer be escaped with
backticks\r\n](elastic/elasticsearch#108431
also including a change that translates `=` to `==` in
WHERE\r\ncommands, and more useful error messages (map a syntax error to
the\r\ncommand where it occurred).\r\n\r\nAs BUCKET is often used for
timeseries data and we replaced single and\r\ndouble quotes around index
names with backticks, this introduces a high\r\nchance of generating
syntactically invalid queries. This PR updates the\r\ndocs and examples
and removes the correction from `\"` and `'` to
\"`\"","sha":"6004cad53af71564b756e116b6b769a9d595dad6"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"#183028
AI Assistant] Remove ES|QL escaping for index names (#183028)\n\nThere
were some last minute changes to ES|QL that will ship in 8.14 that\r\nwe
need to take into account:\r\n\r\n- [BUCKET is now an
aggregation\r\nfunction](elastic/elasticsearch#107272
[index names can no longer be escaped with
backticks\r\n](elastic/elasticsearch#108431
also including a change that translates `=` to `==` in
WHERE\r\ncommands, and more useful error messages (map a syntax error to
the\r\ncommand where it occurred).\r\n\r\nAs BUCKET is often used for
timeseries data and we replaced single and\r\ndouble quotes around index
names with backticks, this introduces a high\r\nchance of generating
syntactically invalid queries. This PR updates the\r\ndocs and examples
and removes the correction from `\"` and `'` to
\"`\"","sha":"6004cad53af71564b756e116b6b769a9d595dad6"}}]}] BACKPORT-->

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
markjhoy pushed a commit to markjhoy/elasticsearch that referenced this pull request May 9, 2024
Disable location quoting in FROM command before 8.14 release to allow
 more time to discuss options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL auto-backport-and-merge Automatically create backport pull requests and merge when ready backport pending >bug ES|QL-ui Impacts ES|QL UI Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.14.1 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants