Skip to content

[ES|QL] Fixes wrong validation on expressions between aggregations#227989

Merged
stratoula merged 1 commit intoelastic:mainfrom
stratoula:fix-wrong-validation-stats-expressions
Jul 16, 2025
Merged

[ES|QL] Fixes wrong validation on expressions between aggregations#227989
stratoula merged 1 commit intoelastic:mainfrom
stratoula:fix-wrong-validation-stats-expressions

Conversation

@stratoula
Copy link
Contributor

@stratoula stratoula commented Jul 15, 2025

Summary

Fixes wrong client side validation error in expressions between aggregations

Before
image

After
image

Checklist

@stratoula stratoula added v9.1.0 v8.19.0 Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// release_note:fix labels Jul 15, 2025
@stratoula stratoula changed the title [ES|QL] Fixes wrong validation on expression betweem aggregations [ES|QL] Fixes wrong validation on expressions between aggregations Jul 15, 2025
@stratoula stratoula added the backport:version Backport to applied version labels label Jul 15, 2025
@stratoula stratoula marked this pull request as ready for review July 15, 2025 13:33
@stratoula stratoula requested a review from a team as a code owner July 15, 2025 13:33
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

Code change looks good

@stratoula stratoula merged commit 3c027eb into elastic:main Jul 16, 2025
25 of 26 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16310694539

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [Security Assistant] Lift starter prompt feature flag (#228039)
- Update dependency @elastic/charts to v70.1.1 (main) (#227902)
- [Security Assistant] Enable InferenceChatModel by default (#227856)
- [Security Assistant] KnowledgeBaseRetrievalTool and AskAboutESQLTool prompt updates (#228074)
- [Response Ops][Reporting] Fixing next run calculation in list scheduled report API (#227704)
- [SharedUX Project Navigation] Fix issue with items in panel openers when side nav is collapsed (#227705)
- [ska] add .gitignore in test dirs (#227013)
- [APM] Try to fix flaky test (#227628)
- [Synthetics] Fix for metric_item component (#227969)
- fix: product docs installation status (#226919)
9.1 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.1:
- [Security Assistant] Enable InferenceChatModel by default (#227856)
- [Security Assistant] KnowledgeBaseRetrievalTool and AskAboutESQLTool prompt updates (#228074)
- [SharedUX Project Navigation] Fix issue with items in panel openers when side nav is collapsed (#227705)
- [ska] add .gitignore in test dirs (#227013)
- [ska] relocate dataset quality api-integration tests (#227826)
- [Explore][Entity Analytics] - Transfer explore pages ownership (#227911)

Manual backport

To create the backport manually run:

node scripts/backport --pr 227989

Questions ?

Please refer to the Backport tool documentation

stratoula added a commit to stratoula/kibana that referenced this pull request Jul 16, 2025
…lastic#227989)

## Summary

Fixes wrong client side validation error in expressions between
aggregations

Before
<img width="3196" height="542" alt="image"
src="https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6"
/>

After
<img width="1598" height="186" alt="image"
src="https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0"
/>

### Checklist
- [ ] [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

(cherry picked from commit 3c027eb)

# Conflicts:
#	src/platform/packages/shared/kbn-esql-ast/src/commands_registry/commands/stats/utils.ts
#	src/platform/packages/shared/kbn-esql-ast/src/commands_registry/commands/stats/validate.test.ts
@stratoula
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.1
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

stratoula added a commit to stratoula/kibana that referenced this pull request Jul 16, 2025
…lastic#227989)

## Summary

Fixes wrong client side validation error in expressions between
aggregations

Before
<img width="3196" height="542" alt="image"
src="https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6"
/>

After
<img width="1598" height="186" alt="image"
src="https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0"
/>

### Checklist
- [ ] [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

(cherry picked from commit 3c027eb)

# Conflicts:
#	src/platform/packages/shared/kbn-esql-ast/src/commands_registry/commands/stats/utils.ts
#	src/platform/packages/shared/kbn-esql-ast/src/commands_registry/commands/stats/validate.test.ts
stratoula added a commit that referenced this pull request Jul 16, 2025
…ions (#227989) (#228129)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ES|QL] Fixes wrong validation on expressions between aggregations
(#227989)](#227989)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2025-07-16T04:50:55Z","message":"[ES|QL]
Fixes wrong validation on expressions between aggregations
(#227989)\n\n## Summary\n\nFixes wrong client side validation error in
expressions between\naggregations\n\nBefore\n<img width=\"3196\"
height=\"542\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6\"\n/>\n\n\nAfter\n<img
width=\"1598\" height=\"186\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0\"\n/>\n\n\n###
Checklist\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c027ebd64fb5819c224d6735e8edc11783211a1","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[ES|QL]
Fixes wrong validation on expressions between
aggregations","number":227989,"url":"https://github.com/elastic/kibana/pull/227989","mergeCommit":{"message":"[ES|QL]
Fixes wrong validation on expressions between aggregations
(#227989)\n\n## Summary\n\nFixes wrong client side validation error in
expressions between\naggregations\n\nBefore\n<img width=\"3196\"
height=\"542\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6\"\n/>\n\n\nAfter\n<img
width=\"1598\" height=\"186\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0\"\n/>\n\n\n###
Checklist\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c027ebd64fb5819c224d6735e8edc11783211a1"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227989","number":227989,"mergeCommit":{"message":"[ES|QL]
Fixes wrong validation on expressions between aggregations
(#227989)\n\n## Summary\n\nFixes wrong client side validation error in
expressions between\naggregations\n\nBefore\n<img width=\"3196\"
height=\"542\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6\"\n/>\n\n\nAfter\n<img
width=\"1598\" height=\"186\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0\"\n/>\n\n\n###
Checklist\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c027ebd64fb5819c224d6735e8edc11783211a1"}}]}]
BACKPORT-->
stratoula added a commit that referenced this pull request Jul 16, 2025
…ons (#227989) (#228128)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[ES|QL] Fixes wrong validation on expressions between aggregations
(#227989)](#227989)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2025-07-16T04:50:55Z","message":"[ES|QL]
Fixes wrong validation on expressions between aggregations
(#227989)\n\n## Summary\n\nFixes wrong client side validation error in
expressions between\naggregations\n\nBefore\n<img width=\"3196\"
height=\"542\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6\"\n/>\n\n\nAfter\n<img
width=\"1598\" height=\"186\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0\"\n/>\n\n\n###
Checklist\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c027ebd64fb5819c224d6735e8edc11783211a1","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[ES|QL]
Fixes wrong validation on expressions between
aggregations","number":227989,"url":"https://github.com/elastic/kibana/pull/227989","mergeCommit":{"message":"[ES|QL]
Fixes wrong validation on expressions between aggregations
(#227989)\n\n## Summary\n\nFixes wrong client side validation error in
expressions between\naggregations\n\nBefore\n<img width=\"3196\"
height=\"542\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6\"\n/>\n\n\nAfter\n<img
width=\"1598\" height=\"186\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0\"\n/>\n\n\n###
Checklist\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c027ebd64fb5819c224d6735e8edc11783211a1"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227989","number":227989,"mergeCommit":{"message":"[ES|QL]
Fixes wrong validation on expressions between aggregations
(#227989)\n\n## Summary\n\nFixes wrong client side validation error in
expressions between\naggregations\n\nBefore\n<img width=\"3196\"
height=\"542\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6\"\n/>\n\n\nAfter\n<img
width=\"1598\" height=\"186\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0\"\n/>\n\n\n###
Checklist\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"3c027ebd64fb5819c224d6735e8edc11783211a1"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Bluefinger pushed a commit to Bluefinger/kibana that referenced this pull request Jul 22, 2025
…lastic#227989)

## Summary

Fixes wrong client side validation error in expressions between
aggregations

Before
<img width="3196" height="542" alt="image"
src="https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6"
/>


After
<img width="1598" height="186" alt="image"
src="https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0"
/>


### Checklist
- [ ] [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
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…lastic#227989)

## Summary

Fixes wrong client side validation error in expressions between
aggregations

Before
<img width="3196" height="542" alt="image"
src="https://github.com/user-attachments/assets/512f0b2c-b64f-40c9-aa08-645f3f312bc6"
/>


After
<img width="1598" height="186" alt="image"
src="https://github.com/user-attachments/assets/d47b1888-4ae9-4f9c-b474-383dede4b3d0"
/>


### Checklist
- [ ] [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:version Backport to applied version labels Feature:ES|QL ES|QL related features in Kibana release_note:fix Team:ESQL ES|QL related features in Kibana t// v8.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments