chore(spec): remove stale #[allow(dead_code)] from snapshot_summary#2514
Open
SreeramGarlapati wants to merge 1 commit into
Open
chore(spec): remove stale #[allow(dead_code)] from snapshot_summary#2514SreeramGarlapati wants to merge 1 commit into
SreeramGarlapati wants to merge 1 commit into
Conversation
The four `#[allow(dead_code)]` attributes in `snapshot_summary.rs` were added in apache#1085 when the module was first introduced, before any caller existed. The chain is now production-live: - `update_snapshot_summaries` is called from `transaction/snapshot.rs` - `truncate_table_summary` is called from `update_snapshot_summaries` - `get_prop` is called 6 times from `truncate_table_summary` - `update_totals` is called 6 times from `update_snapshot_summaries` None of these need the suppression any more. `cargo check -p iceberg` and `cargo clippy -p iceberg --all-features --tests -- -D warnings` both stay clean after the removals. Prompted by review feedback on apache#2511, kept out of that PR to keep its scope focused on the panic fix.
dannycjones
approved these changes
May 26, 2026
Contributor
dannycjones
left a comment
There was a problem hiding this comment.
LGTM, just noticed the same reviewing this file
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.
Which issue does this PR close?
Follow-up to review feedback on #2511 (thread).
What changes are included in this PR?
Removes all four
#[allow(dead_code)]attributes incrates/iceberg/src/spec/snapshot_summary.rs. They were added in #1085 when the module was first introduced, before any caller existed. The chain is now production-live:update_snapshot_summariesis called fromtransaction/snapshot.rstruncate_table_summaryis called fromupdate_snapshot_summariesget_propis called 6 times fromtruncate_table_summaryupdate_totalsis called 6 times fromupdate_snapshot_summariesNone of these need the suppression any more — the dead_code lint is silent without them.
Kept out of #2511 to keep that PR's scope focused on the overwrite-truncate panic fix.
Are these changes tested?
cargo check -p icebergandcargo clippy -p iceberg --all-features --tests -- -D warningsboth stay clean after the removals — i.e. no dead_code warning re-emerges.