-
Notifications
You must be signed in to change notification settings - Fork 25.7k
ESQL: Fix precision of scaled_float field values retrieved from stored source
#122586
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
ESQL: Fix precision of scaled_float field values retrieved from stored source
#122586
Conversation
scaled_float field
scaled_float fieldscaled_float field
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
I'm not sure if any additional tests are necessary, because I found a test that already covers the accuracy loss of scaled floats. Please take a look if you have some time, @lkts. Thank you very much. Lines 85 to 88 in a59c182
|
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
scaled_float fieldscaled_float field values retrieved from stored source
|
Thank you @kanoshiou! Everything looks good to me. Can you please update |
|
buildkite test this please |
| emp_no:integer |height:double |height.float:double |height.half_float:double |height.scaled_float:double | ||
| 10001 |2.03 |2.0299999713897705 |2.029296875 |2.0300000000000002 | ||
| 10090 |2.03 |2.0299999713897705 |2.029296875 |2.0300000000000002 | ||
| 10001 |2.03 |2.0299999713897705 |2.029296875 |2.03 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add a new capability for this fix and use it in this test similar to how fix_parsing_large_negative_numbers is used above. This is needed to fix backward compatibility tests.
|
Thank you for your review, @lkts ! All comments have been addressed. |
|
buildkite test this please |
|
buildkite test this please |
|
@kanoshiou there is one more test failure that i will take care of and we should be good to go. |
|
buildkite test this please |
|
buildkite test this please |
💚 Backport successful
|
…om stored source (#122586) (#123080) * ESQL: Fix precision of `scaled_float` field values retrieved from stored source (#122586) * style --------- Co-authored-by: kanoshiou <[email protected]>
|
@lkts any reason why this hasn't been backported to 9.0 branch as well? |
|
@astefan No particular reason. I figured it's not necessary given that there is no upgrade path that will "revert" this fix. E.g. you either go 9.0 -> 9.1 or 8.19 -> 9.1. I am happy to backport if needed. |
This PR resolves the issue where different results were returned for fields using
scaled_floatdepending on whetherdoc_valueswas enabled or disabled. This discrepancy occurred due to the extra imprecision introduced by the use of double in the calculations.Closes #122547