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

Recursive #3198

Merged
merged 14 commits into from
Sep 18, 2023
Merged

Recursive #3198

merged 14 commits into from
Sep 18, 2023

Conversation

shenkw1
Copy link
Contributor

@shenkw1 shenkw1 commented Aug 18, 2023

Description

A boolean specifying whether to drill down into values and recursively get more key-value pairs from it. The extra key-value pairs will be stored as subkeys of the root key.

Issues Resolved

Resolves #888

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.

…e to have length = 1, switch bracket check logic to pattern matching

Signed-off-by: Kat Shen <[email protected]>
Copy link
Collaborator

@chenqi0805 chenqi0805 left a comment

Choose a reason for hiding this comment

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

Overall looks better. Some comments on regex match and coding style.

@chenqi0805
Copy link
Collaborator

Also please fix the build failure due to checkStyle:

Error: eckstyle] [ERROR] /home/runner/work/data-prepper/data-prepper/data-prepper-plugins/key-value-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/keyvalue/KeyValueProcessor.java:14:8: Unused import - org.opensearch.dataprepper.model.event.JacksonEvent. [UnusedImports]

Signed-off-by: Kat Shen <[email protected]>
Signed-off-by: Kat Shen <[email protected]>
Copy link
Collaborator

@chenqi0805 chenqi0805 left a comment

Choose a reason for hiding this comment

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

Just minor nits. Otherwise LGTM

Signed-off-by: Kat Shen <[email protected]>
@oeyh oeyh merged commit 2bdab0c into opensearch-project:main Sep 18, 2023
24 checks passed
asifsmohammed pushed a commit to asifsmohammed/data-prepper that referenced this pull request Sep 27, 2023
* readme and config

Signed-off-by: Kat Shen <[email protected]>

* clarify readme

Signed-off-by: Kat Shen <[email protected]>

* working on recursive implementation, resolving issues

Signed-off-by: Kat Shen <[email protected]>

* resolve errors

Signed-off-by: Kat Shen <[email protected]>

* inner string parse logic done, working on splitter logic

Signed-off-by: Kat Shen <[email protected]>

* write recursive implementation and reorganize code for clarity, fixing bugs with recursing

Signed-off-by: Kat Shen <[email protected]>

* basic implementation done and working, cleaning code and testing edge cases

Signed-off-by: Kat Shen <[email protected]>

* resolve duplicate value test failures and add basic recursive test

Signed-off-by: Kat Shen <[email protected]>

* write tests and specify configs in regards to recursive

Signed-off-by: Kat Shen <[email protected]>

* switch transform_key config functionality, specify that splitters have to have length = 1, switch bracket check logic to pattern matching

Signed-off-by: Kat Shen <[email protected]>

* clean code

Signed-off-by: Kat Shen <[email protected]>

* fix errors

Signed-off-by: Kat Shen <[email protected]>

* fix nits

Signed-off-by: Kat Shen <[email protected]>

---------

Signed-off-by: Kat Shen <[email protected]>
Co-authored-by: Kat Shen <[email protected]>
@shenkw1 shenkw1 deleted the recursive branch October 15, 2024 19:29
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.

Potential KeyValueProcessor feature: recursive
4 participants