-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add FilterFieldType #17627
base: main
Are you sure you want to change the base?
Add FilterFieldType #17627
Conversation
❌ Gradle check result for 5180b1a: 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? |
It make sense to me. But it seems not delegate all methods, such as |
|
In #17575, it doesn't actually need You're absolutely right about I'll add a unit test that uses reflection to enforce overrides of all methods to catch mistakes if anyone adds more methods to |
import java.util.function.Function; | ||
import java.util.function.Supplier; | ||
|
||
public abstract class FilterFieldType<T extends MappedFieldType> extends MappedFieldType { |
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.
Please add java docs on this class, with some examples on how to use it. This is a good addition in core.
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.
should we annotate this with @PublicApi
?
❌ Gradle check result for bcd79b6: 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? |
bcd79b6
to
3c8423a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17627 +/- ##
============================================
- Coverage 72.40% 72.17% -0.23%
- Complexity 65828 65886 +58
============================================
Files 5316 5331 +15
Lines 305294 306979 +1685
Branches 44289 44652 +363
============================================
+ Hits 221033 221565 +532
- Misses 66187 67216 +1029
- Partials 18074 18198 +124 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
❕ Gradle check result for 6a83731: 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. |
This class allows developers (in core or plugins) to wrap an existing field type, delegating all behavior by default, overriding specific methods as needed. Signed-off-by: Michael Froh <[email protected]>
Signed-off-by: Michael Froh <[email protected]>
After thinking about it some more, the type parameter doesn't really give us anything. Signed-off-by: Michael Froh <[email protected]>
Signed-off-by: Michael Froh <[email protected]>
6a83731
to
36ee328
Compare
❌ Gradle check result for 36ee328: 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? |
Signed-off-by: Michael Froh <[email protected]>
❌ Gradle check result for 3759210: 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? |
Description
This class allows developers (in core or plugins) to wrap an existing field type, delegating all behavior by default, overriding specific methods as needed.
See linked issue for more details.
Related Issues
Resolves #17624
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.