ESQL: Fix precision of scaled_float field values retrieved from stored source#122586
ESQL: Fix precision of scaled_float field values retrieved from stored source#122586lkts merged 9 commits intoelastic:mainfrom
scaled_float field values retrieved from stored source#122586Conversation
scaled_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. |
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
|
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.
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
|
|
@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