Skip to content

Commit

Permalink
fix: dedup pk weights also
Browse files Browse the repository at this point in the history
  • Loading branch information
v0y4g3r committed Feb 21, 2024
1 parent 01e6cb9 commit 424aacc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/mito2/src/memtable/merge_tree/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,13 @@ fn data_buffer_to_record_batches(
rows.into_iter().map(|(_, key)| key.pk_weight),
)) as Arc<_>
} else {
arrow::compute::take(&pk_index_v.to_arrow_array(), &indices_to_take, None)
.context(error::ComputeArrowSnafu)?
pk_index_v.to_arrow_array()
};

columns.push(pk_array);
columns.push(
arrow::compute::take(&pk_array, &indices_to_take, None)
.context(error::ComputeArrowSnafu)?,
);

columns.push(
arrow::compute::take(&ts_v.to_arrow_array(), &indices_to_take, None)
Expand Down

0 comments on commit 424aacc

Please sign in to comment.