diff --git a/src/query/storages/common/table_meta/src/meta/v4/segment.rs b/src/query/storages/common/table_meta/src/meta/v4/segment.rs index 242f5c3d80772..681223b81c6b0 100644 --- a/src/query/storages/common/table_meta/src/meta/v4/segment.rs +++ b/src/query/storages/common/table_meta/src/meta/v4/segment.rs @@ -80,6 +80,20 @@ impl SegmentInfo { pub fn fix_binary_to_string(mut self) -> Self { self.summary.fix_binary_to_string(); + + // This will clone the whole block meta which may be inefficient + self.blocks = self + .blocks + .iter() + .map(|b| { + let mut c = b.as_ref().clone(); + c.col_stats + .iter_mut() + .for_each(|(_, x)| x.fix_binary_to_string()); + + Arc::new(c) + }) + .collect(); self }