Reflection-based protobuf parser only returns single component#11459
Merged
Reflection-based protobuf parser only returns single component#11459
protobuf parser only returns single component#11459Conversation
Add Arrow extension metadata
|
Web viewer built successfully.
Note: This comment is updated whenever you push a commit. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the protobuf reflection parser to consolidate protobuf messages into a single component instead of splitting them into multiple field-based components. This simplifies data extraction from lenses and ensures each protobuf message remains self-contained.
- Changed from field-based component structure to single message component
- Modified parser to use a single StructBuilder wrapped in a FixedSizeListBuilder
- Updated component naming from individual fields to a unified "message" component
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/utils/re_mcap/src/layers/protobuf.rs | Core refactoring of protobuf parser from field-based to message-based structure |
| crates/utils/re_mcap/src/layers/snapshots/re_mcap__layers__protobuf__test__two_simple_rows.snap | Updated test snapshot reflecting new single-component output format |
Comments suppressed due to low confidence (1)
crates/utils/re_mcap/src/layers/protobuf.rs:1
- [nitpick] This function uses a long chain of if-else statements that could be simplified using a match-based approach or a trait-based solution. Consider extracting this logic into a trait implementation for ArrayBuilder types or using a macro to reduce code duplication.
use arrow::{
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
protobuf parser only returns single component
oxkitsune
approved these changes
Oct 8, 2025
| }) | ||
| } | ||
|
|
||
| fn append_null_to_builder(builder: &mut dyn ArrayBuilder) -> Result<(), ProtobufError> { |
Member
There was a problem hiding this comment.
would be nice if ArrayBuilder implemented append_null 🥲
Wumpf
pushed a commit
that referenced
this pull request
Oct 8, 2025
) ### Related * Closes RR-2552. * Related to RR-2553. * Related to #11394. * [x] Requires #11458. ### What This changes our `protobuf` reflection code to put the entire message behind a single component to make it easier to extract it from lenses. This also guarantees that each protobuf message is always self-contained.
grtlr
pushed a commit
that referenced
this pull request
Oct 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related
Lensas a concept for semantic mapping of arbitrary data #11394.protobufmessages asStructArray#11458.What
This changes our
protobufreflection code to put the entire message behind a single component to make it easier to extract it from lenses. This also guarantees that each protobuf message is always self-contained.