-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Refactor FieldDataStats and CompletionStats with Builder pattern #19936
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
Refactor FieldDataStats and CompletionStats with Builder pattern #19936
Conversation
|
❌ Gradle check result for 3e45413: 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? |
|
❌ Gradle check result for 3e45413: 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? |
|
❕ Gradle check result for 3e45413: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19936 +/- ##
============================================
- Coverage 73.25% 73.21% -0.05%
- Complexity 71555 71563 +8
============================================
Files 5785 5785
Lines 326828 326935 +107
Branches 47295 47295
============================================
- Hits 239429 239365 -64
- Misses 68163 68351 +188
+ Partials 19236 19219 -17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sandeshkr419
left a comment
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.
Thanks for working on this. I have one method rename nit comment. Rest LGTM!
server/src/main/java/org/opensearch/index/fielddata/FieldDataStats.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/suggest/completion/CompletionStats.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
3e45413 to
cf9e58d
Compare
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Description
This PR refactors the
FieldDataStatsandCompletionStatsclass to use the Builder pattern instead of relying on multiple constructors.By adopting the Builder pattern, it becomes easier to evolve the stats API, add new metrics, and maintain backward compatibility without forcing disruptive constructor changes.
Based on the related issue:
There are multiple stats-related classes that need similar refactoring, and we are addressing them in priority order. This PR covers
FieldDataStatsandCompletionStatsas part of that effort.Related Issues
Related to #19225
Check List
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.