@@ -9,14 +9,12 @@ use num_traits::AsPrimitive;
99use vortex_buffer:: Buffer ;
1010use vortex_buffer:: BufferMut ;
1111use vortex_error:: VortexResult ;
12- use vortex_error:: vortex_bail;
1312use vortex_error:: vortex_ensure;
1413use vortex_error:: vortex_err;
1514use vortex_mask:: AllOr ;
1615use vortex_mask:: Mask ;
1716
1817use crate :: ArrayRef ;
19- use crate :: Canonical ;
2018use crate :: Columnar ;
2119use crate :: IntoArray ;
2220use crate :: array:: ArrayView ;
@@ -88,7 +86,7 @@ fn take_contiguous_ranges(
8886 let output_len = indices_ref. len ( ) ;
8987 let views = match lengths {
9088 Columnar :: Constant ( lengths) => {
91- let length = constant_unsigned_usize ( & lengths) ? ;
89+ let length = constant_unsigned_usize ( & lengths) ;
9290 match_each_unsigned_integer_ptype ! ( starts. ptype( ) , |S | {
9391 gather_view_slices_constant_length(
9492 source,
@@ -98,7 +96,8 @@ fn take_contiguous_ranges(
9896 ) ?
9997 } )
10098 }
101- Columnar :: Canonical ( Canonical :: Primitive ( lengths) ) => {
99+ Columnar :: Canonical ( lengths) => {
100+ let lengths = lengths. into_primitive ( ) ;
102101 match_each_unsigned_integer_ptype ! ( starts. ptype( ) , |S | {
103102 match_each_unsigned_integer_ptype!( lengths. ptype( ) , |L | {
104103 gather_view_slices(
@@ -110,12 +109,6 @@ fn take_contiguous_ranges(
110109 } )
111110 } )
112111 }
113- Columnar :: Canonical ( lengths) => {
114- vortex_bail ! (
115- "PiecewiseSequenceArray lengths must be primitive or constant, got {}" ,
116- lengths. dtype( )
117- )
118- }
119112 } ;
120113 let validity = array. validity ( ) ?. take ( indices_ref) ?;
121114
0 commit comments