Skip to content

Add first_over_time #127656

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

Merged
merged 5 commits into from
May 4, 2025
Merged

Add first_over_time #127656

merged 5 commits into from
May 4, 2025

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented May 2, 2025

This change adds support for first_over_time for time-series data streams, similar to last_over_time.

@dnhatn dnhatn force-pushed the first-over-time branch from 9e2c619 to 02ff389 Compare May 2, 2025 17:41
@dnhatn dnhatn added :StorageEngine/TSDB You know, for Metrics >non-issue labels May 2, 2025
@dnhatn dnhatn requested review from kkrik-es and limotova May 2, 2025 17:43
@dnhatn dnhatn marked this pull request as ready for review May 2, 2025 17:44
@elasticsearchmachine
Copy link
Collaborator

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

@@ -97,7 +97,7 @@ public class LastOverTime$Type$Aggregator {
void collectValue(int groupId, long timestamp, $type$ value) {
if (groupId < timestamps.size()) {
// TODO: handle multiple values?
if (hasValue(groupId) == false || timestamps.get(groupId) < timestamp) {
if (hasValue(groupId) == false || timestamps.get(groupId) $if(Last)$<$else$>$endif$ timestamp) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lool nice

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.

Cute!

Copy link
Contributor

@limotova limotova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dnhatn dnhatn enabled auto-merge (squash) May 4, 2025 16:19
@dnhatn dnhatn merged commit d4bddc9 into elastic:main May 4, 2025
17 checks passed
@dnhatn dnhatn deleted the first-over-time branch May 4, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants