-
Notifications
You must be signed in to change notification settings - Fork 399
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
Replace TransportChunk
with re_sorbet::ChunkBatch
#8945
Conversation
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
7e171a3
to
3e5ad9c
Compare
3e5ad9c
to
f01efda
Compare
re_sorbet::ChunkSchema
TransportChunk
with re_sorbet::ChunkBatch
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/13259039896 |
@rerun-bot full-check |
Started a full build: https://github.com/rerun-io/rerun/actions/runs/13259070067 ✅ |
@@ -61,9 +61,9 @@ def __init__(self, metadata: dict[bytes, bytes], col: pa.Array): | |||
def component_descriptor(self) -> ComponentDescriptor: | |||
kwargs = {} | |||
if SORBET_ARCHETYPE_NAME in self.metadata: | |||
kwargs["archetype_name"] = "rerun.archetypes" + self.metadata[SORBET_ARCHETYPE_NAME].decode("utf-8") |
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.
Note: this used to be buggy (missing period after archetypes
)
@@ -333,84 +327,32 @@ async fn stream_catalog_async( | |||
|
|||
re_log::info!("Starting to read..."); | |||
while let Some(result) = resp.next().await { | |||
let input = TransportChunk::from(result.map_err(TonicStatusError)?); | |||
|
|||
// Catalog received from the ReDap server isn't suitable for direct conversion to a Rerun Chunk: |
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.
nice to see this gone!
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.
nice work! this was quite easy to follow and makes sense to me.
@@ -35,6 +35,16 @@ pub enum ColumnDescriptor { | |||
} | |||
|
|||
impl ColumnDescriptor { | |||
/// Debug-only sanity check. |
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.
There's nothing in this method that guarantees debug-only behavior though? (same elsewhere)
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.
No guarantees other than the docstring contract
I guess most of my confusion comes from the mention of (That ticket even says: "We will stop using sorbet name until we have cycles to make this a more universal spec.") |
I see "sorbet" as the spec for how we encode Rerun data on-the-wire. As such, it covers both chunks and dataframes. We don't use |
### Related * Follow-up to #8945
Related
Chunk
s should support non-ListArray
component columns #6576What
An arrow record batch needs to follow a specific schema to be be compatible with Rerun,
and that schema is defined in
ChunkSchema
. If a record batch matches the schema, it can be converted to a `ChunkBatche.The schema has:
ChunkBatch::try_from(RecordBatfch)
will automatically wrap data columns inListArray
if needed.TODO
For future PRs
const
antsDataframeBatch
ComponentColumnDescriptor
toDataColumnSchema
, etcComponentColumnDescriptor
is both used for dataframes and chunks. Resolve somehow