Skip to content

[ES|QL] Refactor promql validation#250996

Merged
bartoval merged 7 commits intoelastic:mainfrom
bartoval:refactor_promql_validation
Feb 2, 2026
Merged

[ES|QL] Refactor promql validation#250996
bartoval merged 7 commits intoelastic:mainfrom
bartoval:refactor_promql_validation

Conversation

@bartoval
Copy link
Copy Markdown
Contributor

@bartoval bartoval commented Jan 30, 2026

Summary

With this #250633 we get better support from AST

*
* Example: "PROMQL step=5m col0=(rate(x[5m]))" → "col0=(rate(x[5m]))"
*/
function getPromqlQueryTail(command: ESQLAstPromqlCommand): string {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Go away, you're not beautiful

@bartoval bartoval self-assigned this Jan 30, 2026
@bartoval bartoval added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// v9.4.0 labels Jan 30, 2026
for (const source of sources) {
const indexName = source.name;

if (indexName && !sourceExists(indexName, sourcesSet)) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The other commands generally validate everything so I try to stay aligned, only enrich does a split between prefix and index in the validation

@bartoval bartoval marked this pull request as ready for review January 30, 2026 08:49
@bartoval bartoval requested a review from a team as a code owner January 30, 2026 08:49
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

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 4.5MB 4.5MB -762.0B

History

cc @bartoval

Copy link
Copy Markdown
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

This is an amazing refactor 🙌 LGTM! Code review only

@bartoval bartoval merged commit 46a3317 into elastic:main Feb 2, 2026
16 checks passed
mbondyra added a commit to mbondyra/kibana that referenced this pull request Feb 2, 2026
…iew_cps

* commit '3cd2ea4a515d8a0aafd32f75dc61f1cff892a4b0':
  Fix Failing test: APM Service overview - header filters (elastic#250355)
  [ES|QL] Small improvements on the editor (elastic#251004)
  [ES|QL] Refactor promql validation (elastic#250996)
  [ES|QL] Update the readme in esql-utils (elastic#251024)
  [ES|QL] Grouping functions as arguments to scalar functions (elastic#251015)
  [ES|QL] focus editor when user uses visor (elastic#251084)
  [Contextual Security] add relationship node type for entity graph (elastic#249479)
  [One Workflow] Fix email connector documentation: to field (elastic#251171)
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 Team:ESQL ES|QL related features in Kibana t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants