Skip to content

Conversation

@limotova
Copy link
Contributor

@limotova limotova commented Nov 12, 2025

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.

Copy link
Member

@dnhatn dnhatn left a 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!

EnumMap<AggregateMetricDoubleFieldMapper.Metric, NumberFieldMapper.NumberFieldType> metricFields
) {
if (metricsRequested.contains(AggregateMetricDoubleFieldMapper.Metric.min)) {
minFieldType = metricFields.get(AggregateMetricDoubleFieldMapper.Metric.min);
Copy link
Member

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.

@gmarouli gmarouli self-requested a review November 13, 2025 07:07
Copy link
Contributor

@kkrik-es kkrik-es left a 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.

Copy link
Member

@nik9000 nik9000 left a 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....

Copy link
Member

@dnhatn dnhatn left a 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.

@limotova
Copy link
Contributor Author

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.

Sorry about that, I didn't think it through when I opened the PR.
Thank you all for reviewing it!

@limotova limotova added >non-issue :StorageEngine/ES|QL Timeseries / metrics / logsdb capabilities in ES|QL labels Nov 13, 2025
@limotova limotova marked this pull request as ready for review November 13, 2025 17:32
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@limotova limotova self-assigned this Nov 13, 2025
@limotova limotova merged commit 346abfc into elastic:main Nov 13, 2025
34 checks passed
@limotova limotova deleted the agg-metric-block-loader branch November 13, 2025 18:51
limotova added a commit to limotova/elasticsearch that referenced this pull request Nov 13, 2025
…oaders

This commit modifies AggregateMetricDoubleBlockLoader to delegate reading
fields to DoublesBlockLoader and IntsBlockLoader instead of handling
them itself.

Follow-up of elastic#137949
limotova added a commit to limotova/elasticsearch that referenced this pull request Nov 13, 2025
…oaders

This commit modifies AggregateMetricDoubleBlockLoader to delegate reading
fields to DoublesBlockLoader and IntsBlockLoader instead of handling
them itself.

Follow-up of elastic#137949
limotova added a commit that referenced this pull request Nov 13, 2025
…oaders (#138056)

This commit modifies AggregateMetricDoubleBlockLoader to delegate reading
fields to DoublesBlockLoader and IntsBlockLoader instead of handling
them itself.

Follow-up of #137949
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :StorageEngine/ES|QL Timeseries / metrics / logsdb capabilities in ES|QL Team:StorageEngine v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants