-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
[7.x Backport] Force selection of calendar or fixed intervals #41906
[7.x Backport] Force selection of calendar or fixed intervals #41906
Commits on May 6, 2019
-
Force selection of calendar or fixed intervals in date histo agg (ela…
…stic#33727) The date_histogram accepts an interval which can be either a calendar interval (DST-aware, leap seconds, arbitrary length of months, etc) or fixed interval (strict multiples of SI units). Unfortunately this is inferred by first trying to parse as a calendar interval, then falling back to fixed if that fails. This leads to confusing arrangement where `1d` == calendar, but `2d` == fixed. And if you want a day of fixed time, you have to specify `24h` (e.g. the next smallest unit). This arrangement is very error-prone for users. This PR adds `calendar_interval` and `fixed_interval` parameters to any code that uses intervals (date_histogram, rollup, composite, datafeed, etc). Calendar only accepts calendar intervals, fixed accepts any combination of units (meaning `1d` can be used to specify `24h` in fixed time), and both are mutually exclusive. The old interval behavior is deprecated and will throw a deprecation warning. It is also mutually exclusive with the two new parameters. In the future the old dual-purpose interval will be removed. The change applies to both REST and java clients.
Configuration menu - View commit details
-
Copy full SHA for 3d86288 - Browse repository at this point
Copy the full SHA 3d86288View commit details
Commits on May 7, 2019
-
Configuration menu - View commit details
-
Copy full SHA for fe5a9fb - Browse repository at this point
Copy the full SHA fe5a9fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f1dc24 - Browse repository at this point
Copy the full SHA 2f1dc24View commit details
Commits on May 8, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 0787658 - Browse repository at this point
Copy the full SHA 0787658View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa7e1b6 - Browse repository at this point
Copy the full SHA fa7e1b6View commit details -
Throw exception if legacy interval cannot be parsed
Due to the fallthrough logic, DateIntervalWrapper assumed that an otherwise unparsable interval was a legacy fixed millis interval. This could then NPE if the interval was just illegal ("foobar"). This commit correctly checks if the legacy millis parsing fails too, and throws an IllegalArgumentException at that point signaling the provided interval is bad.
Configuration menu - View commit details
-
Copy full SHA for b8e622d - Browse repository at this point
Copy the full SHA b8e622dView commit details
Commits on May 9, 2019
-
Fix max_bucket test by disallowing partial results (elastic#41959)
The Max Bucket test can potentially return a partial response, where one of the shards suceeds but another fails due to the max_bucket setting. In the case of a partial failure, the status code is 200 OK since some results were returned (with failures listed in the body). This makes the yaml test fail since it is expecting a 4xx/5xx failure when catching exception messages. We need to disallow partial results so that the entire query fails and we can check for the max_bucket failure.
Configuration menu - View commit details
-
Copy full SHA for 7049882 - Browse repository at this point
Copy the full SHA 7049882View commit details
Commits on May 10, 2019
-
Add documentation for calendar/fixed intervals (elastic#41919)
Original PR missed documentation for the new calendar/fixed intervals. This adds the missing documentation
Configuration menu - View commit details
-
Copy full SHA for 9e56889 - Browse repository at this point
Copy the full SHA 9e56889View commit details
Commits on May 20, 2019
-
Configuration menu - View commit details
-
Copy full SHA for b60737a - Browse repository at this point
Copy the full SHA b60737aView commit details