Skip to content

Commit

Permalink
fix small error
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Sep 16, 2024
1 parent ef5e87c commit f9f9e69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/polars-core/src/chunked_array/ops/zip.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::borrow::Cow;

use arrow::bitmap::Bitmap;
use arrow::compute::utils::{combine_validities_and, combine_validities_and_not};
use polars_compute::if_then_else::{if_then_else_validity, IfThenElseKernel};
Expand Down Expand Up @@ -231,7 +233,9 @@ impl ChunkZip<StructType> for StructChunked {
// - Each chunkedarray has an equal length (i.e. is broadcasted)
//
// Therefore, we broadcast only those that are necessary to be broadcasted.
let needs_broadcast = if_true.chunks() > 1 || if_false.chunks() > 1 || mask.chunks() > 1;
let needs_broadcast = if_true.chunks().len() > 1
|| if_false.n_chunks().len() > 1
|| mask.n_chunks().len() > 1;
if needs_broadcast && length > 1 {
// Special case. In this case, we know what to do.
if mask.length == 1 {
Expand Down

0 comments on commit f9f9e69

Please sign in to comment.