Skip to content
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

[query] Implemented the Graphite useSeriesAbove function #2587

Merged
merged 64 commits into from
Oct 9, 2020

Conversation

teddywahle
Copy link
Contributor

@teddywahle teddywahle commented Sep 3, 2020

What this PR does / why we need it:

Implemented the Graphite useSeriesAbove function.

Here's the documentation ---> https://graphite.readthedocs.io/en/latest/functions.html#graphite.render.functions.useSeriesAbove

Does this PR introduce a user-facing and/or backwards incompatible change?:

NONE

Does this PR require updating code package or user-facing documentation?:

NONE

@teddywahle teddywahle changed the title Graphite use series above [query] Implemented the Graphite useSeriesAbove function Sep 3, 2020
@teddywahle teddywahle marked this pull request as draft September 3, 2020 02:48
@@ -150,6 +152,10 @@ func (e mockEngine) FetchByQuery(
return e.fn(ctx, query, opts)
}

func (e mockEngine) Storage() storage.Storage {
return e.storage
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this is equivalent to return nil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, i changed it to return nil and added a comment explaining why the function exists

@@ -94,6 +94,45 @@ func sortByMaxima(ctx *common.Context, series singlePathSpec) (ts.SeriesList, er
return highestMax(ctx, series, len(series.Values))
}

/*
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: mind using // comments instead of /**/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@teddywahle
Copy link
Contributor Author

@arnikola I am going to wait to update this one until the applyByNode PR is done (#2654) because I think there will be a good amount of code re-use.

@m3db m3db deleted a comment from arnikola Oct 5, 2020
Copy link
Collaborator

@arnikola arnikola left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@arnikola arnikola merged commit ed6d5db into m3db:master Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants