-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Preserve nesting for exporting events in JSON format #1257
Conversation
b91df3f
to
769626a
Compare
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.
Looks like you forgot to add table_slice.hpp
changes? I'm curious what drives the need for the at
overload.
auto& payload = caf::get<view<std::string>>(payload_field); | ||
// Make PCAP header. | ||
::pcap_pkthdr header; | ||
auto ns_field = slice.at(row, 0); | ||
auto ns_field = slice.at(row, 0, *pcap_packet_type.at("time")); |
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.
A bit unrelated: I never liked the manual integer offsets to get to a field. Maybe we can factor this logic to happen dynamically when the writer gets instantiated?
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.
I think that belongs to another PR.
|
Ah, got it. The link yields a 404 for me, though, |
Nit: Can you add an assertion to the overload that checks whether the given type is correct? |
Weird CI failure... |
Why? This is exactly #1261, this PR just needs to be rebased. |
a9a36df
to
fa78535
Compare
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.
This PR is great. I've done some performance measurements, and the differences are barely noticeable for Arrow, but show a slight negative impact for MessagePack. We should probably cache the flat layout in there as well as suggested by my previous review.
Additionally, please expand the documentation of the new table_slice::at
function.
f87a753
to
a20534b
Compare
Feedback is integrated and PR is rebased to fix the merge conflict. |
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.
I tested this again locally. Performance is alright, the loss is irrelevant in the grand scheme of things.
Thanks for working on this, it's a big UX improvement.
a20534b
to
161e15c
Compare
The only application of it in `tailor` was redundant.
The layout is always available from the outer context. Now it only contains the type of the field that the offset points to.
Currently only `table_slice_row` uses the 2 argument overload.
- Print mismatched outputs at the WARNING level - Demote "Running step X ..." to DEBUG - Use INFO by default
774cbe5
to
01eb415
Compare
📔 Description
What the title says. Layout types now keep nested records as-is. The JSON writer reconstructs the layers while printing.
📝 Checklist
🎯 Review Instructions
By commit, but do a quick first pass over the list before reviewing properly, several issues are fixed in later commits.