Skip to content

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

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented Nov 4, 2020

📔 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

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

Commit-by-commit works best for this PR.

@dominiklohmann dominiklohmann marked this pull request as ready for review November 4, 2020 21:38
@dominiklohmann dominiklohmann requested a review from a team November 4, 2020 21:38
@dominiklohmann dominiklohmann force-pushed the topic/table-slice-legacy branch from 1e94569 to bf879a8 Compare November 4, 2020 22:00
@dominiklohmann dominiklohmann force-pushed the topic/table-slice-legacy branch 2 times, most recently from 9f7b702 to 560b3ae Compare November 5, 2020 12:04
@dominiklohmann dominiklohmann requested a review from tobim November 5, 2020 12:38
This renames `vast.fbs.table_slice_buffer.v0` to
`vast.fbs.FlatTableSlice`, and removes its erroneous root type
declaration.
@dominiklohmann dominiklohmann force-pushed the topic/table-slice-legacy branch from 560b3ae to b5cf3d8 Compare November 5, 2020 12:48
Copy link
Member

@tobim tobim left a 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.

Comment on lines 35 to 36
std::disjunction<std::is_nothrow_invocable<Visitor>,
std::negation<std::is_invocable<Visitor>>>,
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

@dominiklohmann dominiklohmann force-pushed the topic/table-slice-legacy branch from b5cf3d8 to 7cbc3e0 Compare November 5, 2020 13:05
@dominiklohmann dominiklohmann merged commit a242314 into epic/flatbuffers-persistence-table-slices Nov 5, 2020
@dominiklohmann dominiklohmann deleted the topic/table-slice-legacy branch November 5, 2020 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants