Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Weijun-H committed Mar 21, 2024
1 parent 9b223d3 commit 7e0adff
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions datafusion/functions-array/src/set_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,23 +308,19 @@ fn generic_set_lists<OffsetSize: OffsetSizeTrait>(
nulls.push(false);
continue;
}
(Some(first_arr), Some(second_arr)) => {
(first_arr, second_arr) => {
let first_arr = first_arr.unwrap_or(new_empty_array(&l.value_type()));
let second_arr = second_arr.unwrap_or(new_empty_array(&r.value_type()));
let l_values = converter.convert_columns(&[first_arr])?;
let r_values = converter.convert_columns(&[second_arr])?;
// swap l_values and r_values if set_op is Except, because the values
// in the second array should be removed from the first array
if set_op == SetOp::Except {
(l_values, r_values)
} else {
(r_values, l_values)
} else {
(l_values, r_values)
}
}
(Some(arr), None) | (None, Some(arr)) => {
let r_values =
converter.convert_columns(&[new_empty_array(arr.data_type())])?;
let l_values = converter.convert_columns(&[arr.clone()])?;
(l_values, r_values)
}
};

let l_iter = l_values.iter().sorted().dedup();
Expand Down

0 comments on commit 7e0adff

Please sign in to comment.