Skip to content

Commit

Permalink
clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
0ax1 committed Feb 26, 2025
1 parent ab588d6 commit 153b967
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions encodings/runend/src/compute/take_from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ impl TakeFromFn<&RunEndArray> for RunEndEncoding {
return Ok(None);
}

// Order the values to prepare for runend decoding.
let shuffled = take(array, indices.values())?;
// Transform the run-end encoding from storing indices to storing values
// by taking values from `array` at positions specified in `indices.values()`.
let transformed = take(array, indices.values())?;

// Create a new run-end array now containing the values instead of indices.
let ree_array = RunEndArray::with_offset_and_length(
indices.ends().clone(),
shuffled,
transformed,
indices.offset(),
indices.len(),
)?;
Expand Down

0 comments on commit 153b967

Please sign in to comment.