Skip to content

ES|QL: IllegalStateException with RENAME x AS y, y AS x #131509

@luigidellaquila

Description

@luigidellaquila

On CSV test dataset

from airports_not_indexed 
| drop `city_location`, country, city, ab*, `type`, city_location 
| eval  location = null, fJkoOJwx = -1, `scalerank` = "a", OZucUvNbqb = 900014945 
| rename fJkoOJwx AS OZucUvNbqb, `name` AS FXIrumceg, `scalerank` AS `OZucUvNbqb` 
| drop `FXIrumceg`, FXIrumceg 
| sort OZucUvNbqb DESC 
| mv_expand OZucUvNbqb 
| grok OZucUvNbqb "%{WORD:location} %{WORD:sTyuHhEoGUsq} %{WORD:OZucUvNbqb}" 
| sort sTyuHhEoGUsq 
| sort OZucUvNbqb DESC
| rename OZucUvNbqb as message 
| lookup join message_types_lookup on message 
| limit 14037 
| enrich languages_policy on type 
| sort language_name DESC 
| mv_expand `type` 
| rename `type` AS EhWPxhBDo, sTyuHhEoGUsq AS `EhWPxhBDo`, `message` AS `fKlJNGHdRX`
| rename fKlJNGHdRX as message 
| lookup join message_types_lookup on message
{
    "error": {
        "root_cause": [
            {
                "type": "illegal_state_exception",
                "reason": "Found 1 problem\nline 1:774: Plan [Join[LEFT,[message{r}#57],[message{r}#57],[message{f}#70]]] optimized incorrectly due to missing references from left hand side [message{r}#57]"
            }
        ],
        "type": "illegal_state_exception",
        "reason": "Found 1 problem\nline 1:774: Plan [Join[LEFT,[message{r}#57],[message{r}#57],[message{f}#70]]] optimized incorrectly due to missing references from left hand side [message{r}#57]"
    },
    "status": 500
}

See #131508

Metadata

Metadata

Assignees

Labels

:Analytics/ES|QLAKA ESQL>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)medium-riskAn open issue or test failure that is a medium risk to future releases

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions