-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Fix failure on datafeed preview with date_nanos time field (#77109…
…) (#77121) Preview datafeed currently fails when the time field is of type `date_nanos`. The failure contains the error message: ``` date [...] is after 2262-04-11T23:47:16.854775807 and cannot be stored in nanosecond resolution ``` This commit fixes this failure. The cause of the issue was that preview generates a search with a range query on the time field whose upper bound is `Long.MAX_VALUE` in order to include all available data in the preview. However, that value is parsed with `DateUtils.toLong` when the time field is `date_nanos` and it hits the limitation that values can't be larger than `DateUtils.MAX_NANOSECOND_INSTANT`. The fix checks whether the time field is `date_nanos` and uses `DateUtils.MAX_NANOSECOND_INSTANT` as the upper bound instead of `Long.MAX_VALUE`.
- Loading branch information
1 parent
39a2786
commit 57e3a7c
Showing
2 changed files
with
136 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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