-
Couldn't load subscription status.
- Fork 25.6k
ESQL: Stop inserting EVALs producing NULLs #127820
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
ESQL: Stop inserting EVALs producing NULLs #127820
Conversation
In the case that only some of the fields are missing, this shouldn't be much better than just inserting field extractions that insert the nulls, which should already happen. This may affect performance negatively in cases when all the fields required to run a plan are locally missing - we should check that.
|
I tried to measure this change locally, this are my results: So with small results sets it does become faster and big results (even with lots of nulls) are not negatively affected. |
|
I agree, the performance increase from not trying to optimize is not negligible in cases when this optimizer rule has to walk many fields. I agree that this is worth pursuing. I'd like to be paranoid and double check which other optimizer rules may profit from explicit One rule that, I believe, sometimes benefits from the explicit Filters and evals per se would remain covered - except in cases when there are aliasing steps (in projections) that obscure that a renamed attribute really points to a missing field, which could be replaced by a null.
|
|
Note: I think this PR will make the changes to |
|
Interactions to check before moving forward with this:
|
|
Discussed with @idegtiarenko offline, the necessary work for this has grown due to LOOKUP JOIN:
|
|
Closing for now, we can come back to this once we remodel joins to use expressions (like |
In the case that only some of the fields are missing, this shouldn't be much better than just inserting field extractions that insert the nulls, which should already happen.
This may affect performance negatively in cases when all the fields required to run a plan are locally missing - we should check that.