-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 fieldType to AbstractQueryBuilder and SortBuilder #15328
Conversation
server/src/main/java/org/opensearch/index/query/AbstractQueryBuilder.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/query/AbstractQueryBuilder.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for 095565f: 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? |
095565f
to
14ad54f
Compare
❌ Gradle check result for 14ad54f: 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? |
14ad54f
to
3aaced4
Compare
❌ Gradle check result for 3aaced4: 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? |
3aaced4
to
795c633
Compare
❌ Gradle check result for 795c633: 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? |
795c633
to
ab96823
Compare
❌ Gradle check result for ab96823: 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? |
ab96823
to
a4235ca
Compare
❕ Gradle check result for a4235ca: 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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15328 +/- ##
============================================
- Coverage 72.01% 71.89% -0.12%
- Complexity 63603 63609 +6
============================================
Files 5247 5247
Lines 297186 297355 +169
Branches 42939 42979 +40
============================================
- Hits 214023 213790 -233
- Misses 65610 65944 +334
- Partials 17553 17621 +68 ☔ View full report in Codecov by Sentry. |
a4235ca
to
4b425f1
Compare
We have had some discussion on this here - opensearch-project/query-insights#69. Let us know if you have any suggestions on improving this
And that is the reason we have provided default implementation of fieldName method, so that such QueryBuilders can delegate to that. Maybe having default implementation instead of abstract is better, although new implementations of AbstractQueryBuilder don't necessarily need to implement in that case? |
This reverts commit 839ba0b.
This reverts commit 839ba0b. Signed-off-by: Ankit Jain <akjain@amazon.com>
We are not adding an abstract method to AbstractQueryBuilder. It breaks any plugin that implements a new query type. |
…arch-project#15328)" This reverts commit 839ba0b.
…arch-project#15328)" This reverts commit 839ba0b. Signed-off-by: Ankit Jain <akjain@amazon.com>
…ject#15328) * Add fieldType to AbstractQueryBuilder and FieldSortBuilder Signed-off-by: David Zane <davizane@amazon.com> * Add fieldType to AbstractQueryBuilder and SortBuilder Signed-off-by: David Zane <davizane@amazon.com> --------- Signed-off-by: David Zane <davizane@amazon.com> Signed-off-by: Ankit Jain <akjain@amazon.com> Co-authored-by: Ankit Jain <akjain@amazon.com>
…arch-project#15328)" (opensearch-project#15633) This reverts commit 839ba0b. Signed-off-by: Ankit Jain <akjain@amazon.com>
…ject#15328) * Add fieldType to AbstractQueryBuilder and FieldSortBuilder Signed-off-by: David Zane <davizane@amazon.com> * Add fieldType to AbstractQueryBuilder and SortBuilder Signed-off-by: David Zane <davizane@amazon.com> --------- Signed-off-by: David Zane <davizane@amazon.com> Signed-off-by: Ankit Jain <akjain@amazon.com> Co-authored-by: Ankit Jain <akjain@amazon.com>
…arch-project#15328)" (opensearch-project#15633) This reverts commit 839ba0b. Signed-off-by: Ankit Jain <akjain@amazon.com>
…ject#15328) * Add fieldType to AbstractQueryBuilder and FieldSortBuilder Signed-off-by: David Zane <davizane@amazon.com> * Add fieldType to AbstractQueryBuilder and SortBuilder Signed-off-by: David Zane <davizane@amazon.com> --------- Signed-off-by: David Zane <davizane@amazon.com> Signed-off-by: Ankit Jain <akjain@amazon.com> Co-authored-by: Ankit Jain <akjain@amazon.com>
…arch-project#15328)" (opensearch-project#15633) This reverts commit 839ba0b. Signed-off-by: Ankit Jain <akjain@amazon.com>
…ject#15328) * Add fieldType to AbstractQueryBuilder and FieldSortBuilder Signed-off-by: David Zane <davizane@amazon.com> * Add fieldType to AbstractQueryBuilder and SortBuilder Signed-off-by: David Zane <davizane@amazon.com> --------- Signed-off-by: David Zane <davizane@amazon.com> Signed-off-by: Ankit Jain <akjain@amazon.com> Co-authored-by: Ankit Jain <akjain@amazon.com>
…arch-project#15328)" (opensearch-project#15633) This reverts commit 839ba0b. Signed-off-by: Ankit Jain <akjain@amazon.com>
Description
fieldType
class variable and getter methods inAbstractQueryBuilder
andFieldSortBuilder
.fieldName()
as an abstract method inAbstractQueryBuilder
. This requires all child classes to implementfieldName()
. Child classes which do not already have afieldName()
method defined should callgetDefaultFieldName()
which returns null.Related Issues
opensearch-project/query-insights#69
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.