Skip to content

Commit a6a0907

Browse files
committed
last thing
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent f2c3432 commit a6a0907

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

encodings/runend/src/compute/filter.rs

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ fn filter_run_end_primitive<R: NativePType + AsPrimitive<usize>>(
185185

186186
count += run_true_count;
187187
if keep {
188-
new_run_ends[j] =
189-
NumCast::from(count).vortex_expect("filtered run end count must fit in run-end type");
188+
new_run_ends[j] = NumCast::from(count)
189+
.vortex_expect("filtered run end count must fit in run-end type");
190190
j += 1;
191191
}
192192

@@ -282,7 +282,11 @@ mod tests {
282282
)
283283
}
284284

285-
fn filter_with_mode(array: &ArrayRef, mask: Mask, mode: RunEndFilterMode) -> VortexResult<ArrayRef> {
285+
fn filter_with_mode(
286+
array: &ArrayRef,
287+
mask: Mask,
288+
mode: RunEndFilterMode,
289+
) -> VortexResult<ArrayRef> {
286290
let _guard = override_run_end_filter_mode(mode);
287291
let mut ctx = LEGACY_SESSION.create_execution_ctx();
288292
array.filter(mask)?.execute::<ArrayRef>(&mut ctx)
@@ -350,23 +354,32 @@ mod tests {
350354
#[test]
351355
fn encoded_filter_matches_take_on_partial_word_boundaries() -> VortexResult<()> {
352356
let array = run_end_fixture(65, 260);
353-
let mask = Mask::from_slices(array.len(), vec![(3, 64), (67, 129), (133, 194), (197, 259)]);
357+
let mask = Mask::from_slices(
358+
array.len(),
359+
vec![(3, 64), (67, 129), (133, 194), (197, 259)],
360+
);
354361

355362
assert_encoded_filter_matches_take(&array, mask)
356363
}
357364

358365
#[test]
359366
fn encoded_filter_matches_take_on_clustered_masks() -> VortexResult<()> {
360367
let array = run_end_fixture(1_024, 16_384);
361-
let mask = Mask::from_slices(array.len(), vec![(13, 513), (4_109, 4_733), (9_001, 10_129)]);
368+
let mask = Mask::from_slices(
369+
array.len(),
370+
vec![(13, 513), (4_109, 4_733), (9_001, 10_129)],
371+
);
362372

363373
assert_encoded_filter_matches_take(&array, mask)
364374
}
365375

366376
#[test]
367377
fn encoded_filter_matches_take_on_very_short_runs() -> VortexResult<()> {
368378
let array = run_end_fixture(1, 64);
369-
let mask = Mask::from_slices(array.len(), vec![(1, 3), (5, 8), (13, 14), (21, 25), (34, 35)]);
379+
let mask = Mask::from_slices(
380+
array.len(),
381+
vec![(1, 3), (5, 8), (13, 14), (21, 25), (34, 35)],
382+
);
370383

371384
assert_encoded_filter_matches_take(&array, mask)
372385
}

0 commit comments

Comments
 (0)