Skip to content

[8.13] ESQL: Fix wrong attribute shadowing in pushdown rules (#105650)#105808

Merged
elasticsearchmachine merged 2 commits intoelastic:8.13from
alex-spies:backport/8.13/pr-105650
Feb 26, 2024
Merged

[8.13] ESQL: Fix wrong attribute shadowing in pushdown rules (#105650)#105808
elasticsearchmachine merged 2 commits intoelastic:8.13from
alex-spies:backport/8.13/pr-105650

Conversation

@alex-spies
Copy link
Copy Markdown
Contributor

Backports the following commits to 8.13:

Fix elastic#105434

Fixes accidental shadowing when pushing down `GROK`/`DISSECT`, `EVAL` or
`ENRICH` past a `SORT`.

Example for how this works:

```
...
| SORT x
| EVAL x = y
...

pushing this down just like that would be incorrect as x is used in the SORT, so we turn this essentially into

...
| EVAL $$x = x
| EVAL x = y
| SORT $$x
| DROP $$x
...
```

The same logic is applied to `GROK`/`DISSECT` and `ENRICH`.

This allows to re-enable the dependency checker (after fixing a small
bug in it when handling `ENRICH`).
@alex-spies alex-spies added :Analytics/ES|QL AKA ESQL >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Feb 26, 2024
@elasticsearchmachine elasticsearchmachine merged commit a7ef700 into elastic:8.13 Feb 26, 2024
@alex-spies alex-spies deleted the backport/8.13/pr-105650 branch February 26, 2024 15:25
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-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.13.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants