-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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(parsers.json_v2): Reset parser before parsing (#13805) #14344
Conversation
Thanks so much for the pull request! |
!signed-cla |
@agiilit-admin how do you plan to use it? IMO the subpaths should be cleaned out on every call to |
In CSV parser there is a separate
but since here I could not think of a use case where |
I think my comment was a bit misleading, sorry for that! What I mean is, why implement an exported |
Oh and @agiilit-admin you need to sign the CLA as otherwise we cannot take your PR... |
I thought I did and posted the |
Probably it is just a learned predisposition: I don't think Anyway, comments added. |
While I do agree with your thinking, in the current state this is useless to export Therefore, please do not export the |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
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.
Thanks for finding and fixing this issue @agiilit-admin! Very much appreciated!
Required for all PRs
resolves #13805
Running json_v2 parser leaves
p.subPathResults
dirty, affecting subsequent runs. This is a problem for input plugins reusing json_v2 parser instance instead of creating a new one.Following the pattern of
csv
parser, added aReset()
method, which clearssubPathResults
. It is called inInit()
and when startingParse()
.