Skip to content

[ES|QL] Construct list of quotable keywords from lexer definition, remove hard-coded list#230730

Merged
vadimkibana merged 1 commit intoelastic:mainfrom
vadimkibana:grammar-keywords
Aug 6, 2025
Merged

[ES|QL] Construct list of quotable keywords from lexer definition, remove hard-coded list#230730
vadimkibana merged 1 commit intoelastic:mainfrom
vadimkibana:grammar-keywords

Conversation

@vadimkibana
Copy link
Contributor

@vadimkibana vadimkibana commented Aug 6, 2025

Summary

Retrieves a list of keywords from the lexer instead of maintaining a hard-coded version.

I see some "dev mode" keywords are missing in the lexer list (such as FUSE command), I am thinking it is because those are behind the "dev mode" flag, and will appear once released. Or, we can append more keywords to the new list, if needed.

Checklist

@vadimkibana
Copy link
Contributor Author

/ci

_quotableKeywords = new Set<string>();

for (const literalName of esql_lexer.literalNames) {
// Remove null and empty strings
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
// Remove null and empty strings
// Remove nulls

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
onechat 416 417 +1
securitySolution 7857 7858 +1
unifiedSearch 436 437 +1
total +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
onechat 707.7KB 769.1KB +61.4KB
securitySolution 10.3MB 10.3MB -187.0B
total +61.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-srcJs 3.8MB 3.8MB -305.0B
securitySolution 94.5KB 94.5KB +1.0B
total -304.0B

@vadimkibana vadimkibana marked this pull request as ready for review August 6, 2025 11:42
@vadimkibana vadimkibana requested a review from a team as a code owner August 6, 2025 11:42
@vadimkibana vadimkibana added review release_note:skip Skip the PR/issue when compiling release notes Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// backport:version Backport to applied version labels v9.2.0 labels Aug 6, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@vadimkibana vadimkibana enabled auto-merge (squash) August 6, 2025 11:44
Copy link
Contributor

@bartoval bartoval left a comment

Choose a reason for hiding this comment

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

@vadimkibana vadimkibana merged commit 8ab9d7e into elastic:main Aug 6, 2025
26 checks passed
gergoabraham pushed a commit to gergoabraham/kibana that referenced this pull request Aug 7, 2025
…move hard-coded list (elastic#230730)

## Summary

Retrieves a list of keywords from the lexer instead of maintaining a
hard-coded version.

I see some "dev mode" keywords are missing in the lexer list (such as
`FUSE` command), I am thinking it is because those are behind the "dev
mode" flag, and will appear once released. Or, we can append more
keywords to the new list, if needed.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
@wildemat wildemat mentioned this pull request Aug 7, 2025
10 tasks
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 8, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 230730 locally
cc: @vadimkibana

@stratoula stratoula added backport:skip This PR does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels labels Aug 8, 2025
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…move hard-coded list (elastic#230730)

## Summary

Retrieves a list of keywords from the lexer instead of maintaining a
hard-coded version.

I see some "dev mode" keywords are missing in the lexer list (such as
`FUSE` command), I am thinking it is because those are behind the "dev
mode" flag, and will appear once released. Or, we can append more
keywords to the new list, if needed.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana release_note:skip Skip the PR/issue when compiling release notes review Team:ESQL ES|QL related features in Kibana t// v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants