Add time interval dim filter and retention analysis example#3315
Merged
gianm merged 3 commits intoapache:masterfrom Aug 5, 2016
Merged
Add time interval dim filter and retention analysis example#3315gianm merged 3 commits intoapache:masterfrom
gianm merged 3 commits intoapache:masterfrom
Conversation
| final byte[][] intervalsBytes = new byte[intervals.size()][]; | ||
| int intervalsBytesSize = 0; | ||
| int index = 0; | ||
| for (Interval interval : intervals) { |
Contributor
There was a problem hiding this comment.
The intervals can be stored as start/end millis pairs, which should simplify the cache key generation.
Contributor
Author
There was a problem hiding this comment.
@gianm the filter now stores a list of start/end pairs for cache-key and filter conversion purposes
Member
|
@jon-wei, great example. 👍 |
Contributor
|
👍 |
1 similar comment
Contributor
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR adds a new DimFilter that provides a convenient syntax for range filtering on long millisecond timestamp columns.
The new IntervalDimFilter accepts an array of ISO 8601 intervals, converts them into startMillis/endMillis ranges.
Its toFilter() method converts the IntervalDimFilter to an OR of BoundFilters from those millisecond ranges.
The PR also adds a test/docs demonstrating a basic retention analysis example, using the new time interval filter.