Public getIncludes method in SourceFieldMapper#20290
Public getIncludes method in SourceFieldMapper#20290sohami merged 2 commits intoopensearch-project:mainfrom
Conversation
WalkthroughAdded a public getter for includes in SourceFieldMapper and changed Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
90d9d6b to
eb666b3
Compare
|
❌ Gradle check result for eb666b3: 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? |
eb666b3 to
467d1e5
Compare
|
❕ Gradle check result for 467d1e5: 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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #20290 +/- ##
=========================================
Coverage 73.16% 73.17%
+ Complexity 71744 71732 -12
=========================================
Files 5795 5795
Lines 328304 328305 +1
Branches 47281 47281
=========================================
+ Hits 240216 240236 +20
+ Misses 68822 68805 -17
+ Partials 19266 19264 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java
Outdated
Show resolved
Hide resolved
467d1e5 to
40a70f7
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java (1)
286-292: Consider adding JavaDoc for these public API methods.The implementation correctly returns immutable collections using
List.of(), which provides good encapsulation by preventing external modification of the internal state. However, since this class is marked with@PublicApi, these methods should include JavaDoc comments describing their purpose and return values.📝 Suggested JavaDoc addition
+ /** + * Returns the list of fields to include in the source. + * + * @return an immutable collection of field patterns to include + */ public Collection<String> getIncludes() { return List.of(includes); } + /** + * Returns the list of fields to exclude from the source. + * + * @return an immutable collection of field patterns to exclude + */ public Collection<String> getExcludes() { return List.of(excludes); }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
CHANGELOG.md(1 hunks)server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
- GitHub Check: gradle-check
- GitHub Check: assemble (25, windows-latest)
- GitHub Check: Analyze (java)
- GitHub Check: assemble (25, ubuntu-latest)
- GitHub Check: assemble (21, windows-latest)
- GitHub Check: assemble (25, ubuntu-24.04-arm)
- GitHub Check: assemble (21, ubuntu-24.04-arm)
- GitHub Check: precommit (25, ubuntu-24.04-arm)
- GitHub Check: precommit (21, windows-2025, true)
- GitHub Check: assemble (21, ubuntu-latest)
- GitHub Check: precommit (21, macos-15)
- GitHub Check: precommit (25, windows-latest)
- GitHub Check: precommit (25, macos-15)
- GitHub Check: precommit (25, macos-15-intel)
- GitHub Check: precommit (21, ubuntu-latest)
- GitHub Check: precommit (21, windows-latest)
- GitHub Check: precommit (21, ubuntu-24.04-arm)
- GitHub Check: precommit (21, macos-15-intel)
- GitHub Check: precommit (25, ubuntu-latest)
- GitHub Check: detect-breaking-change
🔇 Additional comments (2)
CHANGELOG.md (1)
10-10: LGTM!The CHANGELOG entry accurately describes the addition of the public getter for the included field and is consistent with the existing format.
server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java (1)
60-60: LGTM!The import addition is necessary to support the new return type.
Signed-off-by: Sahil Buddharaju <sahilbud@amazon.com>
40a70f7 to
0cec8f3
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
CHANGELOG.md(1 hunks)server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
- GitHub Check: gradle-check
- GitHub Check: precommit (21, windows-2025, true)
- GitHub Check: precommit (25, macos-15-intel)
- GitHub Check: precommit (21, ubuntu-latest)
- GitHub Check: precommit (25, macos-15)
- GitHub Check: precommit (25, windows-latest)
- GitHub Check: precommit (21, windows-latest)
- GitHub Check: precommit (25, ubuntu-24.04-arm)
- GitHub Check: precommit (21, macos-15)
- GitHub Check: precommit (21, macos-15-intel)
- GitHub Check: precommit (25, ubuntu-latest)
- GitHub Check: precommit (21, ubuntu-24.04-arm)
- GitHub Check: Analyze (java)
- GitHub Check: assemble (25, ubuntu-latest)
- GitHub Check: assemble (25, ubuntu-24.04-arm)
- GitHub Check: assemble (21, ubuntu-latest)
- GitHub Check: assemble (21, windows-latest)
- GitHub Check: assemble (25, windows-latest)
- GitHub Check: assemble (21, ubuntu-24.04-arm)
- GitHub Check: detect-breaking-change
Signed-off-by: sahil <61558528+buddharajusahil@users.noreply.github.com>
Description
This change is adding a public getter function for the includes list in SourceFieldMapper.
Related Issues
Resolves #20289
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.
Summary by CodeRabbit
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.