-
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.
Fix bucket keys format for range aggregations on float field (#81801)
When dealing with float fields we actually store float values with lower precision. Later on, when loading float values into double values, the precision difference between float and double values surfaces as additional "spurious" digits in the string representation which is propagated to the client during serialisation. As a result of this, the JSON response returned to the client includes range values not matching values in the request. This results in clients, including Kibana, to break while trying to match ranges in the request with ranges in the response. With this change we use two new fields, `originalFrom` and `originalTo` to hold the original double values before manipulating the precision of float fields. Later we use these fields in the code dealing with serialisation. The effect is that precision issue resulting from float to double conversions are not propagated to clients.
- Loading branch information
1 parent
e747898
commit 3550370
Showing
13 changed files
with
356 additions
and
43 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
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
Oops, something went wrong.