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

feat(sumologicschemaprocessor): add squashing single values in nesting processor #881

Merged
merged 1 commit into from
Dec 23, 2022

Conversation

aboguszewski-sumo
Copy link
Contributor

Updates #865

This PR adds a feature to nesting processor that squashes maps that have only one key-value pair. For example:

{
"k8s": {
  "pods": {
    "a" : "A",
    "b": "B"
    }
  }
}

gets squashed into

{
"k8s.pods": {
    "a" : "A",
    "b": "B"
    }
}

This feature is disabled by default.

Two things to note:

  • Perhaps this implementation contains too much map copying, but I wanted to finish this before Christmas and eventually fix later.
  • I tried to create an algorithm that does this while doing the initial nesting, but I found it to be too complex and not necessarily faster.

@aboguszewski-sumo aboguszewski-sumo requested a review from a team as a code owner December 23, 2022 11:58
@github-actions github-actions bot added documentation Improvements or additions to documentation go labels Dec 23, 2022
Copy link
Contributor

@sumo-drosiek sumo-drosiek left a comment

Choose a reason for hiding this comment

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

🤷

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

Successfully merging this pull request may close these issues.

2 participants