Skip to content

Commit aa123dd

Browse files
committed
fixes
Signed-off-by: Robert Kruszewski <github@robertk.io>
1 parent fa27422 commit aa123dd

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

  • vortex-array/src/test_harness/trace

‎vortex-array/src/test_harness/trace/tests.rs‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ fn trace_optimize_contiguous_filter() -> VortexResult<()> {
398398
)?
399399
.into_array();
400400
let outer =
401-
FilterArray::try_new(inner, Mask::from_iter([true, false, true, false]))?.into_array();
401+
FilterArray::try_new(inner, Mask::from_iter([false, true, true, false]))?.into_array();
402402

403403
let traced = trace_op_with(
404404
TraceOptions {
@@ -411,7 +411,7 @@ fn trace_optimize_contiguous_filter() -> VortexResult<()> {
411411
assert!(optimized_slice.child().is::<Filter>());
412412
assert_arrays_eq!(
413413
traced.output,
414-
PrimitiveArray::from_iter([0i32, 3]),
414+
PrimitiveArray::from_iter([2i32, 3]),
415415
&mut execution_ctx()
416416
);
417417
insta::assert_snapshot!(traced.trace.to_string(), @r"
@@ -435,20 +435,25 @@ fn trace_optimize_contiguous_filter() -> VortexResult<()> {
435435
// The trace below only records the shape of the execution; pin the values it produced too.
436436
assert_arrays_eq!(
437437
traced.output,
438-
PrimitiveArray::from_iter([0i32, 3]),
438+
PrimitiveArray::from_iter([2i32, 3]),
439439
&mut execution_ctx()
440440
);
441441
insta::assert_snapshot!(traced.trace.to_string(), @"
442442
execute_until target=AnyCanonical root=vortex.filter(i32, len=2)
443443
iter 0 current=vortex.filter(i32, len=2) builder_active=false
444-
ExecuteSlot slot=0 parent=vortex.filter(i32, len=2) child=vortex.filter(i32, len=4)
445-
iter 1 current=vortex.filter(i32, len=4) stack_parent=vortex.filter(i32, len=2) slot=0 builder_active=false
444+
Done array=vortex.slice(i32, len=2)
445+
iter 1 current=vortex.slice(i32, len=2) builder_active=false
446+
ExecuteSlot slot=0 parent=vortex.slice(i32, len=2) child=vortex.filter(i32, len=4)
447+
iter 2 current=vortex.filter(i32, len=4) stack_parent=vortex.slice(i32, len=2) slot=0 builder_active=false
446448
Done array=vortex.primitive(i32, len=4)
447-
iter 2 current=vortex.primitive(i32, len=4) stack_parent=vortex.filter(i32, len=2) slot=0 builder_active=false
448-
pop_frame slot=0 output=vortex.filter(i32, len=2)
449-
iter 3 current=vortex.filter(i32, len=2) builder_active=false
449+
iter 3 current=vortex.primitive(i32, len=4) stack_parent=vortex.slice(i32, len=2) slot=0 builder_active=false
450+
pop_frame slot=0 output=vortex.slice(i32, len=2)
451+
iter 4 current=vortex.slice(i32, len=2) builder_active=false
452+
optimize root=vortex.slice(i32, len=2) session=false
453+
reduce_parent static:SliceReduceAdaptor(Primitive) slot=0 parent=vortex.slice(i32, len=2) child=vortex.primitive(i32, len=4) -> vortex.primitive(i32, len=2)
454+
done output=vortex.primitive(i32, len=2)
450455
Done array=vortex.primitive(i32, len=2)
451-
iter 4 current=vortex.primitive(i32, len=2) builder_active=false
456+
iter 5 current=vortex.primitive(i32, len=2) builder_active=false
452457
return output=vortex.primitive(i32, len=2)
453458
");
454459

0 commit comments

Comments
 (0)