-
-
Notifications
You must be signed in to change notification settings - Fork 99
Allow for extending the table slice FlatBuffers table #1143
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
Allow for extending the table slice FlatBuffers table #1143
Conversation
1e94569
to
bf879a8
Compare
9f7b702
to
560b3ae
Compare
This renames `vast.fbs.table_slice_buffer.v0` to `vast.fbs.FlatTableSlice`, and removes its erroneous root type declaration.
560b3ae
to
b5cf3d8
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.
So far all changes are understandable and reasonable.
libvast/vast/table_slice_visit.hpp
Outdated
std::disjunction<std::is_nothrow_invocable<Visitor>, | ||
std::negation<std::is_invocable<Visitor>>>, |
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 is kinda hard to understand. We have 3 cases here:
throws | nothrow | absent | |
---|---|---|---|
nothrow_invocable | false | true | false |
not invokable | false | false | true |
or | false | true | true |
So it is correct. We could think about switching the order, I assume the default will usually be absent.
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.
It should be about 50-50. Currently there's lots of missing defaults, but that is only because we necessarily use it outside of table_slice.cpp
. I still agree with changing the order, as that makes it easier to read in my opinion.
Ideally, we can move the visit function inside table_slice.cpp
in the future and stop exposing the underlying FlatBuffers table at all.
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 have reversed the order as suggested and rebased to get rid of all fixup! commits.
b5cf3d8
to
7cbc3e0
Compare
📔 Description
The third PR to be merged into #1140. This set of changes wraps the existing table slice FlatBuffers table in a union, and cleans up the
table_slice.fbs
file accordingly, and adds a utility function for visiting table slice encodings.📝 Checklist
🎯 Review Instructions
Commit-by-commit works best for this PR.