Skip to content

Commit

Permalink
fix a bug in deduplicate map
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Jun 13, 2024
1 parent b7402a2 commit 6dfa21f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/algorithm/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,6 @@ impl MapKeys {
false
}
}
pub fn into_value(self) -> Value {
remove_empty_rows(self.keys.into_rows())
}
fn present_indices(&self) -> Vec<usize> {
let mut present_indices: Vec<_> = (self.keys.rows().enumerate())
.filter(|(_, k)| !k.is_any_empty_cell() && !k.is_any_tombstone())
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/monadic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ impl<T: ArrayValue> Array<T> {
}
let map_keys_unique = self
.take_map_keys()
.map(|keys| (keys.into_value(), self.unique()));
.map(|keys| (keys.normalized(), self.unique()));
let mut deduped = CowSlice::new();
let mut seen = HashSet::new();
let mut new_len = 0;
Expand Down

0 comments on commit 6dfa21f

Please sign in to comment.