Skip to content
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 NPE in map to list processor #5342

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

oeyh
Copy link
Collaborator

@oeyh oeyh commented Jan 16, 2025

Description

Get rid of the use of List.of and Map.of to allow for null values in input map for map_to_list processor

Issues Resolved

Resolves #5341

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

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.

Signed-off-by: Hai Yan <[email protected]>
Copy link
Collaborator

@san81 san81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are changing the existing behavior so we should make sure to update the documentation to reflect this change.

@oeyh oeyh merged commit 3b12ca1 into opensearch-project:main Jan 17, 2025
45 of 47 checks passed
@oeyh
Copy link
Collaborator Author

oeyh commented Jan 17, 2025

We are changing the existing behavior so we should make sure to update the documentation to reflect this change.

Thanks for the review. To me, It's more like fixing an expected behavior than changing the existing behavior: it should be OK to have null values in the input map, but it was having NPE due to implementation (List.of and Map.of).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] MapToList processor throws NPE when input map contains null values
3 participants