Skip to content

Conversation

@kkewwei
Copy link
Contributor

@kkewwei kkewwei commented Apr 10, 2025

Description

This PR only addresses the mismatch issue.

As it's known, float and double types suffer from precision loss, and it's inevitable. When reading doc_value in the filed(such as range, sorting, or aggregation), it can lead to unforeseen exceptions. The root cause lies in the fact that the precision of float/double data is already lost before storing.

long scaledValue = Math.round(doubleValue * scalingFactor);

It can be extremely terrifying when related to money.

To solve it, I will submit a new PR. In this PR, I will create a new type big_decimal, supported by BigDecimal to effectively eliminate the precision loss.

Related Issues

Resolves #12433

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link
Contributor

❌ Gradle check result for 40380fb: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kkewwei kkewwei force-pushed the scaled_float_not_match branch from 40380fb to adbf317 Compare April 10, 2025 15:05
@github-actions
Copy link
Contributor

❌ Gradle check result for adbf317: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kkewwei kkewwei marked this pull request as draft April 10, 2025 16:10
@kkewwei kkewwei force-pushed the scaled_float_not_match branch from 2ba7c47 to ade3cae Compare April 11, 2025 02:46
@github-actions
Copy link
Contributor

❌ Gradle check result for 66bb50e: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kkewwei
Copy link
Contributor Author

kkewwei commented Apr 11, 2025

❌ Gradle check result for 66bb50e: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

MinimumClusterManagerNodesIT.testThreeNodesNoClusterManagerBlock #14289
RemoteStoreBackpressureAndResiliencyIT.testWritesRejectedDueToTimeLagBreach #12411
DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode #15806

@kkewwei
Copy link
Contributor Author

kkewwei commented Apr 11, 2025

@bowenlan-amzn would you mind have a look in your spare time, very thank you.

@kkewwei kkewwei force-pushed the scaled_float_not_match branch from 66bb50e to 75cea4e Compare April 14, 2025 08:20
@github-actions
Copy link
Contributor

❌ Gradle check result for 75cea4e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kkewwei kkewwei force-pushed the scaled_float_not_match branch from 75cea4e to 88bcdda Compare April 14, 2025 09:46
@github-actions
Copy link
Contributor

❌ Gradle check result for 88bcdda: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kkewwei
Copy link
Contributor Author

kkewwei commented Apr 14, 2025

❌ Gradle check result for 88bcdda: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

EhCacheDiskCacheTests.testComputeIfAbsentConcurrently #16159

@github-actions
Copy link
Contributor

❌ Gradle check result for b1a19aa: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

… values

Signed-off-by: kkewwei <kewei.11@bytedance.com>
Signed-off-by: kkewwei <kkewwei@163.com>
@kkewwei kkewwei force-pushed the scaled_float_not_match branch from b1a19aa to b36c641 Compare April 18, 2025 02:57
@github-actions
Copy link
Contributor

❌ Gradle check result for b36c641: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kkewwei kkewwei closed this Apr 18, 2025
@kkewwei kkewwei reopened this Apr 18, 2025
@github-actions
Copy link
Contributor

❌ Gradle check result for b36c641: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kkewwei
Copy link
Contributor Author

kkewwei commented Apr 18, 2025

❌ Gradle check result for b36c641: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

RemoteStorePinnedTimestampsGarbageCollectionIT.testLiveIndexNoPinnedTimestampsWithExtraGenSetting #16088
DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode #15806

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label May 18, 2025
@kkewwei kkewwei closed this Sep 6, 2025
@kkewwei
Copy link
Contributor Author

kkewwei commented Sep 6, 2025

Closing in favor of #19188.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Search Search query, autocomplete ...etc stalled Issues that have stalled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] match query on a scaled_float property no longer matches for some values

2 participants