-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ES|QL] Modify AggregateMetricDoubleBlockLoader to load partial metrics #137949
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
Conversation
dnhatn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some comments, but the approach looks good. Thanks Larisa!
...in/java/org/elasticsearch/xpack/aggregatemetric/mapper/AggregateMetricDoubleBlockLoader.java
Outdated
Show resolved
Hide resolved
...in/java/org/elasticsearch/xpack/aggregatemetric/mapper/AggregateMetricDoubleBlockLoader.java
Outdated
Show resolved
Hide resolved
| EnumMap<AggregateMetricDoubleFieldMapper.Metric, NumberFieldMapper.NumberFieldType> metricFields | ||
| ) { | ||
| if (metricsRequested.contains(AggregateMetricDoubleFieldMapper.Metric.min)) { | ||
| minFieldType = metricFields.get(AggregateMetricDoubleFieldMapper.Metric.min); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're here, could you also migrate these to DoublesBlockLoader or LongsBlockLoader? These classes can push down reading to the codec.
...in/java/org/elasticsearch/xpack/aggregatemetric/mapper/AggregateMetricDoubleBlockLoader.java
Show resolved
Hide resolved
kkrik-es
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, getting there.
In the future, it's best to send the refactoring change separately (can be reviewed very fast), to keep the one with the actual changes smaller and easier to review.
nik9000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd get this in as is and then integrate in a separate PR. That way you can spend the entire PR fighting with what makes this unique in the optimization rules....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're here, could you also migrate these to DoublesBlockLoader or LongsBlockLoader?
We can do this in a follow-up.
Sorry about that, I didn't think it through when I opened the PR. |
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
…oaders This commit modifies AggregateMetricDoubleBlockLoader to delegate reading fields to DoublesBlockLoader and IntsBlockLoader instead of handling them itself. Follow-up of elastic#137949
…oaders This commit modifies AggregateMetricDoubleBlockLoader to delegate reading fields to DoublesBlockLoader and IntsBlockLoader instead of handling them itself. Follow-up of elastic#137949
This commit modifies the existing AggregateMetricDoubleBlockLoader to accept an EnumMap containing the submetrics that should be loaded (any of min, max, sum, value_count).
It also moves the BlockLoader into its own file.