You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "u70b3 (via GitHub)" <gi...@apache.org> on 2026/07/30 03:27:38 UTC

[PR] fix(spec): implement Display for BinaryTableStats [paimon-rust]

u70b3 opened a new pull request, #632:
URL: https://github.com/apache/paimon-rust/pull/632

   ### Purpose
   
   Linked issue: close #631
   
   The `Display` impl for `BinaryTableStats` in `spec/stats.rs` is the repository's only `todo!()` and would panic if any code path ever formats stats through `Display` (logging, debugging, error messages). This implements it.
   
   ### Brief change log
   
   Implement `Display` for `BinaryTableStats` as a labeled summary, following the convention of `DataFileMeta`'s `Display`:
   
   ```
   BinaryTableStats{minValues=[0, 0, 0, 2, 1], maxValues=[0, 0, 0, 2, 9], nullCounts=[Some(0), None, Some(3)]}
   ```
   
   - `min_values`/`max_values` are serialized `BinaryRow`s that cannot be decoded without the column types, so they print as raw bytes — the same convention `DataFileMeta` uses for its `minKey`/`keyStats` fields.
   - `null_counts` items are `Option<i64>` (`None` = unknown), which `{:?}` renders naturally.
   
   ### Tests
   
   - `spec::stats::tests::display_formats_labeled_fields` — exact output for known bytes, including `Some`/`None` null-count mixes
   - `spec::stats::tests::display_empty_stats_does_not_panic` — `BinaryTableStats::empty()` boundary case
   
   `cargo test -p paimon --lib spec::` passes (450 tests); `cargo fmt` and `clippy` are clean.
   
   ### API and Format
   
   No API or storage format change; this fills in a previously unimplemented trait method.
   
   ### Documentation
   
   No documentation update needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(spec): implement Display for BinaryTableStats [paimon-rust]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #632:
URL: https://github.com/apache/paimon-rust/pull/632


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org