File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
vortex-array/src/builders Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -695,6 +695,13 @@ impl PrecomputedViewAdjustment {
695695 . as_ref ( )
696696 . map ( |o| o[ b_idx as usize ] )
697697 . unwrap_or_default ( ) ;
698+
699+ // If offset < offset_shift, this view was invalid and wasn't counted in buffer_utilizations.
700+ // Return an empty view to match how invalid views are handled in the Rewriting path.
701+ if view_ref. offset < offset_shift {
702+ return BinaryView :: empty_view ( ) ;
703+ }
704+
698705 view_ref
699706 . with_buffer_and_offset ( b_idx + buffer_offset, view_ref. offset - offset_shift)
700707 }
@@ -708,6 +715,13 @@ impl PrecomputedViewAdjustment {
708715 . as_ref ( )
709716 . map ( |o| o[ b_idx as usize ] )
710717 . unwrap_or_default ( ) ;
718+
719+ // If offset < offset_shift, this view was invalid and wasn't counted in buffer_utilizations.
720+ // Return an empty view to match how invalid views are handled in the Rewriting path.
721+ if view_ref. offset < offset_shift {
722+ return BinaryView :: empty_view ( ) ;
723+ }
724+
711725 view_ref. with_buffer_and_offset ( buffer, view_ref. offset - offset_shift)
712726 }
713727 }
You can’t perform that action at this time.
0 commit comments