-
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
Fix ignore_missing parameter has no effect in rename ingest processor #9725
Fix ignore_missing parameter has no effect in rename ingest processor #9725
Conversation
…t in rename ingest processor Signed-off-by: Gao Binlong <[email protected]>
Compatibility status:Checks if related components are compatible with change b19ed23 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git] |
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Gao Binlong <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #9725 +/- ##
============================================
- Coverage 71.16% 71.08% -0.09%
+ Complexity 58114 58048 -66
============================================
Files 4824 4824
Lines 273897 273900 +3
Branches 39910 39911 +1
============================================
- Hits 194926 194708 -218
- Misses 62573 62865 +292
+ Partials 16398 16327 -71
|
Could anyone help to review this PR? Thanks! |
modules/ingest-common/src/main/java/org/opensearch/ingest/common/RenameProcessor.java
Outdated
Show resolved
Hide resolved
modules/ingest-common/src/test/java/org/opensearch/ingest/common/RenameProcessorTests.java
Show resolved
Hide resolved
Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: gaobinlong <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
@msfroh any comments from your side? thank you! |
Looks good to me! 👍 Thanks @gaobinlong ! |
…#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <[email protected]> * Small change Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: gaobinlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: gaobinlong <[email protected]> Co-authored-by: Andriy Redko <[email protected]> (cherry picked from commit 921cd0c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…#9725) (#10043) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor * Small change --------- (cherry picked from commit 921cd0c) Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: gaobinlong <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Andriy Redko <[email protected]>
…opensearch-project#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <[email protected]> * Small change Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: gaobinlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: gaobinlong <[email protected]> Co-authored-by: Andriy Redko <[email protected]>
…opensearch-project#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <[email protected]> * Small change Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: gaobinlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: gaobinlong <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: Ivan Brusic <[email protected]>
…opensearch-project#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <[email protected]> * Small change Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: gaobinlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: gaobinlong <[email protected]> Co-authored-by: Andriy Redko <[email protected]>
…opensearch-project#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <[email protected]> * Small change Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: gaobinlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: gaobinlong <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Fix the bug of ignore_missing parameter has no effect when using template snippet in rename ingest processor, if the field in the template snippet
{{field}}
does not exist, the resolved field path is''
, thendocument.hasField
method will throwpath cannot be null nor empty
error directly even though the parameterignore_missing
istrue
. So we should check the resolve field path in advance, if it's empty andignore_missing
istrue
, exits quietly.Related Issues
#9687
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.