-
Notifications
You must be signed in to change notification settings - Fork 539
Add -
formatting option for redacted values
#11383
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
Web viewer built successfully.
Note: This comment is updated whenever you push a commit. |
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.
Pull Request Overview
This PR introduces a -
formatting option for redacted values in RecordBatch
-derived structs to support snapshot testing with non-deterministic values. The change allows using {:-}
format specifier to get string representations with redacted non-deterministic content like TUIDs.
- Updates
Display
implementations to pass thesign_minus()
flag to formatting functions - Modifies
format_record_batch_with_width
to accept aredact_non_deterministic
parameter - Removes custom redaction wrapper structs in favor of the new formatting option
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
crates/store/re_format_arrow/src/lib.rs | Adds redact_non_deterministic parameter to format_record_batch_with_width function |
crates/store/re_chunk/src/chunk.rs | Updates Display impl to pass f.sign_minus() for redaction control |
crates/store/re_sorbet/src/sorbet_batch.rs | Updates Display impl to pass f.sign_minus() for redaction control |
crates/store/re_sorbet/src/chunk_batch.rs | Updates Display impl to pass f.sign_minus() for redaction control |
crates/store/re_dataframe/src/query.rs | Updates test helper to pass f.sign_minus() for redaction control |
crates/store/re_chunk/tests/formatting.rs | Removes custom ChunkRedacted wrapper and uses new - format option |
crates/utils/re_mcap/src/layers/protobuf.rs | Removes custom ChunkRedacted wrapper and uses new - format option |
crates/utils/re_mcap/Cargo.toml | Removes unused re_format_arrow dev dependency |
CODE_STYLE.md | Documents the new - formatting option convention |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
### Related * Post-merge comment: #11383 (comment) ### What See comment linked above.
Related
RecordBatch
with redactions for non-deterministic values #11278.What
This PR allows you to use the minus sign (
-
) formatting option in mostRecordBatch
-derived structs to get a string that has non-deterministic values redacted.Usage:
Using
#
instead of-
would be an alternative, but I think it's better to reserve this for a more meaningful representation.