Expose maxDataPoints to storage finders #159
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This exposes
maxDataPoints
to custom finders/readers so they may pre-compute rollups at the storage layer. Fixes the primary request of #109.This doesn't implement another feature mentioned in that issue: to pass the consolidation function defined via
consolidateBy
to the finder/reader. That could be an area of improvement in the future but I can't dream up an application for it at the moment.The implementation requires an attr flag be set on the finder/reader to avoid breaking backward compatibility with existing plugins.
There are a few related code paths in here that don't look to have great test coverage so I would hold off on merging this until I can do a bit of end to end testing with a finder/reader implementation that supports it, particularly with multi-fetch. I'll be testing this in the day or two.