File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
datafusion/physical-expr/src/expressions Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -456,21 +456,19 @@ impl ResultBuilder {
456456
457457 match & mut self . state {
458458 Partial { arrays, indices } => {
459- // This is check is only active for debug config because the callers of this method,
460- // `case_when_with_expr` and `case_when_no_expr`, already ensure that
461- // they only calculate a value for each row at most once.
462- #[ cfg( debug_assertions) ]
463- for row_ix in row_indices. as_primitive :: < UInt32Type > ( ) . values ( ) . iter ( ) {
464- if !indices[ * row_ix as usize ] . is_none ( ) {
465- return internal_err ! ( "Duplicate value for row {}" , * row_ix) ;
466- }
467- }
468-
469459 let array_index = PartialResultIndex :: try_new ( arrays. len ( ) ) ?;
470460
471461 arrays. push ( row_values) ;
472462
473463 for row_ix in row_indices. as_primitive :: < UInt32Type > ( ) . values ( ) . iter ( ) {
464+ // This is check is only active for debug config because the callers of this method,
465+ // `case_when_with_expr` and `case_when_no_expr`, already ensure that
466+ // they only calculate a value for each row at most once.
467+ #[ cfg( debug_assertions) ]
468+ if !indices[ * row_ix as usize ] . is_none ( ) {
469+ return internal_err ! ( "Duplicate value for row {}" , * row_ix) ;
470+ }
471+
474472 indices[ * row_ix as usize ] = array_index;
475473 }
476474 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments