[ML] Fix failure on datafeed preview with date_nanos time field#77109
Merged
dimitris-athanasiou merged 3 commits intoelastic:masterfrom Sep 1, 2021
Merged
Conversation
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`.
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
2 tasks
This was referenced Sep 1, 2021
dimitris-athanasiou
added a commit
to dimitris-athanasiou/elasticsearch
that referenced
this pull request
Sep 1, 2021
…tic#77109) 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`.
dimitris-athanasiou
added a commit
to dimitris-athanasiou/elasticsearch
that referenced
this pull request
Sep 1, 2021
…tic#77109) 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`.
Collaborator
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 1, 2021
…) (#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`.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 1, 2021
…) (#77119) 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`.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 1, 2021
…) (#77120) 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`.
dimitris-athanasiou
added a commit
to dimitris-athanasiou/elasticsearch
that referenced
this pull request
Nov 29, 2021
In elastic#77109 a bug was fixed with regard to `date_nanos` time fields and the preview datafeed API. However, that fix introduces a new bug. As we are calling the field caps API to find out whether the time field is `date_nanos`, we are setting the datafeed indices on the request. This may result to erroneous behaviour on local indices and it certainly will result to an error if the datafeed's indices are remote. This commit fixes that problem by setting the datafeed's indices on the field caps request.
dimitris-athanasiou
added a commit
that referenced
this pull request
Nov 29, 2021
In #77109 a bug was fixed with regard to `date_nanos` time fields and the preview datafeed API. However, that fix introduces a new bug. As we are calling the field caps API to find out whether the time field is `date_nanos`, we are setting the datafeed indices on the request. This may result to erroneous behaviour on local indices and it certainly will result to an error if the datafeed's indices are remote. This commit fixes that problem by setting the datafeed's indices on the field caps request.
dimitris-athanasiou
added a commit
to dimitris-athanasiou/elasticsearch
that referenced
this pull request
Nov 29, 2021
In elastic#77109 a bug was fixed with regard to `date_nanos` time fields and the preview datafeed API. However, that fix introduces a new bug. As we are calling the field caps API to find out whether the time field is `date_nanos`, we are setting the datafeed indices on the request. This may result to erroneous behaviour on local indices and it certainly will result to an error if the datafeed's indices are remote. This commit fixes that problem by setting the datafeed's indices on the field caps request.
dimitris-athanasiou
added a commit
to dimitris-athanasiou/elasticsearch
that referenced
this pull request
Nov 29, 2021
In elastic#77109 a bug was fixed with regard to `date_nanos` time fields and the preview datafeed API. However, that fix introduces a new bug. As we are calling the field caps API to find out whether the time field is `date_nanos`, we are setting the datafeed indices on the request. This may result to erroneous behaviour on local indices and it certainly will result to an error if the datafeed's indices are remote. This commit fixes that problem by setting the datafeed's indices on the field caps request.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 29, 2021
In #77109 a bug was fixed with regard to `date_nanos` time fields and the preview datafeed API. However, that fix introduces a new bug. As we are calling the field caps API to find out whether the time field is `date_nanos`, we are setting the datafeed indices on the request. This may result to erroneous behaviour on local indices and it certainly will result to an error if the datafeed's indices are remote. This commit fixes that problem by setting the datafeed's indices on the field caps request.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 29, 2021
In #77109 a bug was fixed with regard to `date_nanos` time fields and the preview datafeed API. However, that fix introduces a new bug. As we are calling the field caps API to find out whether the time field is `date_nanos`, we are setting the datafeed indices on the request. This may result to erroneous behaviour on local indices and it certainly will result to an error if the datafeed's indices are remote. This commit fixes that problem by setting the datafeed's indices on the field caps request.
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.
Preview datafeed currently fails when the time field is of type
date_nanos. The failure contains the error message: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_VALUEin order to include allavailable data in the preview. However, that value is parsed
with
DateUtils.toLongwhen the time field isdate_nanosandit hits the limitation that values can't be larger than
DateUtils.MAX_NANOSECOND_INSTANT. The fix checks whether thetime field is
date_nanosand usesDateUtils.MAX_NANOSECOND_INSTANTas the upper bound instead of
Long.MAX_VALUE.