-
Notifications
You must be signed in to change notification settings - Fork 402
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
Add general re_sorbet::SorbetSchema
#9017
Conversation
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/13291750145 |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/13291795215 |
44a1d8b
to
07f5f1a
Compare
07f5f1a
to
fd930c4
Compare
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/13293774280 |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/13293864264 |
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 looking great!
### Related * Part of #8744 ### What Expand `re_sorbet` with `SorbetSchema` and `SorbetBatch` - a superset of the existing `ChunkSchema` and `ChunkBatch`. ### How I'm using a pretty ~ugly~ interesting approach of "fake inheritance": Define `A` -> `B` as: * `struct A` contains a `B` * `impl Deref<Target=B> for A` (upcasting) * `impl TryFrom<B> for A` (“downcasting”) * `impl From<A> for B` (“object slicing”) Using this notation: * `ChunkSchema` -> `SorbetSchema` * `ChunkBatch` -> `SorbetBatch` -> `arrow::RecordBatch` This means the `ChunkBatch` can be used as `SorbetBatch` but also as an `arrow::RecordBatch`. Note that there is no dynamic dispatch involved at all.
Related
re_sorbet
Chunk/Dataframe conversion crate handle arrow metadata #8744What
Expand
re_sorbet
withSorbetSchema
andSorbetBatch
- a superset of the existingChunkSchema
andChunkBatch
.How
I'm using a pretty
uglyinteresting approach of "fake inheritance":Define
A
->B
as:struct A
contains aB
impl Deref<Target=B> for A
(upcasting)impl TryFrom<B> for A
(“downcasting”)impl From<A> for B
(“object slicing”)Using this notation:
ChunkSchema
->SorbetSchema
ChunkBatch
->SorbetBatch
->arrow::RecordBatch
This means the
ChunkBatch
can be used asSorbetBatch
but also as anarrow::RecordBatch
.Note that there is no dynamic dispatch involved at all.