Skip to content

handle fields that do not have a value splitter#103

Open
yaauie wants to merge 1 commit intologstash-plugins:mainfrom
yaauie:valueless-keys
Open

handle fields that do not have a value splitter#103
yaauie wants to merge 1 commit intologstash-plugins:mainfrom
yaauie:valueless-keys

Conversation

@yaauie
Copy link
Copy Markdown
Contributor

@yaauie yaauie commented Jun 8, 2022

By prepending an optional, non-capturing field splitter to our scanning regexp
we ensure that a valueless key is fully consumed, preventing a multibyte field
splitter from partially leaking into the next key.

Correctly parses out k1 => v1 and k2 => v2 from any of the following
sequences using the field splitter __:

missing__k1=v1__k2=v2
k1=v1__missing__k2=v2
k1=v1__k2=v2__missing

Co-authored-by: Tom Gregory thomas.gregory@elastic.co

By prepending an optional, non-capturing field splitter to our scanning regexp
we ensure that a valueless key is fully consumed, preventing a multibyte field
splitter from partially leaking into the next key.

Correctly parses out `k1` => `v1` and `k2` => `v2` from any of the following
sequences using the field splitter `__`:

    missing__k1=v1__k2=v2
    k1=v1__missing__k2=v2
    k1=v1__k2=v2__missing

Co-authored-by: Tom Gregory <thomas.gregory@elastic.co>
@mashhurs
Copy link
Copy Markdown
Contributor

mashhurs commented Jun 8, 2022

Do we need to version up (and include changelog)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants