From 13ed3f9acb478a2cb25ebc7bd90bcad00a8e6cdf Mon Sep 17 00:00:00 2001 From: Dom Dwyer Date: Mon, 19 Dec 2022 11:18:21 +0100 Subject: [PATCH] fix: show lack of partition data in query output Show that a PartitionResponse does not contain data in the Debug output. --- ingester2/src/query/partition_response.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ingester2/src/query/partition_response.rs b/ingester2/src/query/partition_response.rs index 150f0f6f40..541cf8abcc 100644 --- a/ingester2/src/query/partition_response.rs +++ b/ingester2/src/query/partition_response.rs @@ -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", &"") + .field( + "batches", + &match self.batches { + Some(_) => "", + None => ",", + }, + ) .field("partition_id", &self.id) .field("max_persisted", &self.max_persisted_sequence_number) .field(