-
Notifications
You must be signed in to change notification settings - Fork 25k
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
ReplaceMissingFieldWithNull rule lead to huge number of eval operators #104583
Comments
Pinging @elastic/es-analytical-engine (Team:Analytics) |
And the field loading infrastructure detects missing fields and loads them with |
@nik9000 Do you mean that we should just remove that rule and have the ValuesSourceReaderOperator take care of this instead? |
Maybe so! I don't have the code in front of me and I think it'd be useful to make sure we can merge the reads into a single operator run. But presuming we can do that I think that's fine. |
Improve ReplaceMissingFieldWithNull to create just one eval for the missing value and have the rest point to it. This reduces the amount of EvalOperators created in the pipeline. Fix elastic#104583
If that's easily possible, I think that'd be the best way to go about this. |
Go ahead and merge, yeah. That get's us out of trouble. But it'd be nice to have a good story around why it's better to do this with eval. The readers are indeed pretty good at this. |
The presence of the eval can simplify some queries and transform them in a local relation (not even reaching the Lucene level). I don't think it's so easy to determine if the presence of the rule is more beneficial than just having good readers. This might be one of those "features" that can prove their usefulness (or not) with time and edge cases. The logic behind it is pretty strong and I wouldn't discard it without a very good reason. |
My 2 cents, optimizations tend to increase complexity: every optimization is one more piece of code to maintain, one more moving part that can interact/overlap/clash with other components, and a potential source of bugs. |
…104586) Improve ReplaceMissingFieldWithNull to create just one eval (per datatype) for the missing value and have the rest point to it. This reduces the amount of EvalOperators created in the pipeline. Preserve type information (one null eval per dataType) Fix subtle error in LocalPhysicalPlanOptimizer test Fix #104583
…lastic#104586) Improve ReplaceMissingFieldWithNull to create just one eval (per datatype) for the missing value and have the rest point to it. This reduces the amount of EvalOperators created in the pipeline. Preserve type information (one null eval per dataType) Fix subtle error in LocalPhysicalPlanOptimizer test Fix elastic#104583 (cherry picked from commit d6f900c)
…104586) (#104669) Improve ReplaceMissingFieldWithNull to create just one eval (per datatype) for the missing value and have the rest point to it. This reduces the amount of EvalOperators created in the pipeline. Preserve type information (one null eval per dataType) Fix subtle error in LocalPhysicalPlanOptimizer test Fix #104583 (cherry picked from commit d6f900c)
There is an OOM report from a simple query
FROM some-index | LIMIT 10
. I found in the heap dump that some Drivers has more 16K eval operators. I believe the ruleReplaceMissingFieldWithNull
could translate missing fields to anEval
. This lead to many eval operators if the target indices have many missing fields. Since 8.12, ValuesSourceReaderOperator can now read multiple fields at the same time. I think we need to combine these Literals in a single EvalOperator like we do with ValuesSourceReaderOperator.The text was updated successfully, but these errors were encountered: