Skip to content

Commit

Permalink
fix(query): add fix_binary_to_string in block
Browse files Browse the repository at this point in the history
  • Loading branch information
sundy-li committed Jan 13, 2024
1 parent a0efca5 commit dfbe571
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/query/storages/common/table_meta/src/meta/v4/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit dfbe571

Please sign in to comment.