-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Replace explicit type conversion with instanceof pattern variable in org.opensearch.search package #19714
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
Conversation
…org.opensearch.search package Signed-off-by: Binlong Gao <[email protected]>
Signed-off-by: Binlong Gao <[email protected]>
Signed-off-by: Binlong Gao <[email protected]>
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.
LGTM!
Thanks for picking this up!
I have been procrastinating to do this myself.
server/src/main/java/org/opensearch/search/query/TopDocsCollectorContext.java
Show resolved
Hide resolved
|
❌ Gradle check result for 0c92e9f: 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? |
Known issue: #15821 |
Signed-off-by: Binlong Gao <[email protected]>
|
❌ Gradle check result for e277f97: 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? |
server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSource.java
Show resolved
Hide resolved
|
❌ Gradle check result for e277f97: 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 e277f97: 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? |
|
@gaobinlong Can you please rebase with main once - bwc should succeed then. |
|
❌ Gradle check result for 1b9cf48: 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? |
Description
Use the modern instanceof pattern variables instead of explicit type conversions in the package org.opensearch.search, this can improve the code readability and reduce potential ClassCastException risks.
Most code are generated by LLM, and I checked them manually and reverted the unnecessary and wrong changes.
Related Issues
No issue, just mentioned this in a previous PR.
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.