-
Notifications
You must be signed in to change notification settings - Fork 24.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES|QL: ClassCastException - Literal cannot be cast to NamedExpression during local planning #109974
Labels
Comments
Pinging @elastic/es-analytical-engine (Team:Analytics) |
This was referenced Jun 24, 2024
elasticsearchmachine
pushed a commit
that referenced
this issue
Jul 3, 2024
…ll (#110373) Fix ReplaceMissingFieldWithNull by explicitly listing the commands that can be optimized replacing missing FieldAttributed with NULL Literals. Also adding a unit test that demonstrates possible scenarios where introducing a new command can lead to `ClassCastException` with `ReplaceMissingFieldWithNull` local optimization rule and an integration test that covers #109974 Fixes #110150
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The problem happened on a very wide index pattern, where most likely some nodes are executing an
MV_EXPAN
on an attribute that does not exist on the local shards.The local planner is running ReplaceMissingFieldWithNull optimization and probably replacing the target of MV_EXPAND with a
Literal
, but MV_EXPAND defines it asNamedExpression
.Happens with the following queries:
For this second query, in my specific case it fails with some specific limits (eg.
LIMIT 10
) but not with higher limits (eg.LIMIT 1000
)The text was updated successfully, but these errors were encountered: