File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
vortex-array/src/expr/exprs Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -132,26 +132,25 @@ impl VTable for ListContains {
132132 ( true , true ) => {
133133 let list = lhs. into_scalar ( ) . vortex_expect ( "scalar" ) . into_list ( ) ;
134134 let needle = rhs. into_scalar ( ) . vortex_expect ( "scalar" ) ;
135- // Convert the needle scalar to a single-element vector and reuse
136- // constant_list_scalar_contains
137- let needle_vector = needle. repeat ( 1 ) . freeze ( ) ;
138- constant_list_scalar_contains ( list, needle_vector)
135+ // Convert the needle scalar to a vector with row_count
136+ // elements and reuse constant_list_scalar_contains
137+ let needle_vector = needle. repeat ( args . row_count ) . freeze ( ) ;
138+ constant_list_scalar_contains ( list, needle_vector) ?
139139 }
140140 ( true , false ) => constant_list_scalar_contains (
141141 lhs. into_scalar ( ) . vortex_expect ( "scalar" ) . into_list ( ) ,
142142 rhs. into_vector ( ) . vortex_expect ( "vector" ) ,
143- ) ,
143+ ) ? ,
144144 ( false , true ) => list_contains_scalar (
145145 lhs. unwrap_into_vector ( args. row_count ) . into_list ( ) ,
146146 rhs. into_scalar ( ) . vortex_expect ( "scalar" ) . into_list ( ) ,
147- ) ,
147+ ) ? ,
148148 ( false , false ) => {
149149 vortex_bail ! (
150150 "ListContains currently only supports constant needle (RHS) or constant list (LHS)"
151151 )
152152 }
153- } ?;
154-
153+ } ;
155154 Ok ( Datum :: Vector ( matches. into ( ) ) )
156155 }
157156
You can’t perform that action at this time.
0 commit comments