Preserve metadata for multi timestamp records#219
Open
Jacob-gr wants to merge 1 commit intofox-it:mainfrom
Open
Preserve metadata for multi timestamp records#219Jacob-gr wants to merge 1 commit intofox-it:mainfrom
Jacob-gr wants to merge 1 commit intofox-it:mainfrom
Conversation
Author
|
I'm new to contributing, but wanted to give it a shot. I tested this proposed code by creating a venv for both the main dissect and this change using. From withing the
Viewing the output, I see the metadata fields populated. Running I'm not sure if there is a better way to test, so please let me know. I'm happy to learn. In addition, I'm not sure if there are other metadata fields that should be included. It appeard |
This file contains hidden or 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
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.
Preserve metadata for multi timestamp records
Fixes metadata fields (
_source,_classification,_generated) being set to nullwhen
iter_timestamped_records()expands a record into multi-timestamped recordsby explicitly copying metadata fields to new
TimestampRecordobject.Also fixes an issue with shadowed
recordvariable in loop: use a separate result variableinstead of reassigning
recordin the loop, which previously caused subsequent iterationsto extend an already-extended record.
Includes a test to validate metadata values are retained. Due to using a new variable in the loop,
a change to
test_multi_timestamp_descriptor_cache()is required to adjust the expected cache missesand hits. Because we are not mutating
recordeach loop, we should only expect 1 cache miss.fixes #218