fix: show lack of partition data in query output

Show that a PartitionResponse does not contain data in the Debug output.
pull/24376/head
Dom Dwyer 2022-12-19 11:18:21 +01:00
parent dc5c59f15f
commit 13ed3f9acb
No known key found for this signature in database
GPG Key ID: E4C40DBD9157879A
1 changed files with 7 additions and 1 deletions

View File

@ -23,7 +23,13 @@ pub(crate) struct PartitionResponse {
impl std::fmt::Debug for PartitionResponse {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("PartitionResponse")
.field("batches", &"<SNAPSHOT STREAM>")
.field(
"batches",
&match self.batches {
Some(_) => "<SNAPSHOT STREAM>",
None => "<NO DATA>,",
},
)
.field("partition_id", &self.id)
.field("max_persisted", &self.max_persisted_sequence_number)
.field(