-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 handling for json arrays in lookup_all pipeline function #17820
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danotorrey
approved these changes
Jan 3, 2024
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 and tests successfully! Will we want to backport this as well?
Thanks Dan! Yeah that was my plan, to get it usable in Illuminate sooner. |
ryan-carroll-graylog
added a commit
that referenced
this pull request
Jan 10, 2024
* Add handling for json arrays in lookup_all pipeline function * Add changelog entry * Update failing tests * Revert unneeded non string functionality * Update changelog * Cleanup test
ryan-carroll-graylog
added a commit
that referenced
this pull request
Jan 11, 2024
* Update select_jsonpath to accept strings of JSON in addition to JsonNode objects (#17683) * Update select_jsonpath to accept strings of JSON in addition to JsonNode objects * Add unit test * Add changelog entry * Update changelog with correct issue/pr Co-authored-by: Zack King <91903901+kingzacko1@users.noreply.github.com> --------- Co-authored-by: Zack King <91903901+kingzacko1@users.noreply.github.com> * Add handling for json arrays in lookup_all pipeline function (#17820) * Add handling for json arrays in lookup_all pipeline function * Add changelog entry * Update failing tests * Revert unneeded non string functionality * Update changelog * Cleanup test --------- Co-authored-by: Zack King <91903901+kingzacko1@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add support for JSON nodes in
lookup_all
pipeline function.Motivation and Context
When array elements are selected from the
json_path
pipeline function, the array will include JacksonJsonNode
elements containing the actual object values within. When passed to thelookup_all
pipeline function, the function will fail look up the values in the array due to the JSON objects. This fix converts theJsonNode
values to native Java Objects to be used as keys in the lookup table.Closes: https://github.com/Graylog2/graylog-plugin-enterprise/issues/6363
How Has This Been Tested?
Well-covered with unit tests and manual testing was performed. See PR unit tests for examples.
Types of changes
Checklist: