Skip to content

Commit

Permalink
solve several smaller issues
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Jan 15, 2025
1 parent 14e839f commit 332161a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/polars-arrow/src/array/binview/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ impl<T: ViewType + ?Sized> MutableBinaryViewArray<T> {
bm.extend_constant(slf_len, true);
bm.extend_from_bitmap(other);
*v = Some(bm);
}
},
(Some(slf), Some(other)) => slf.extend_from_bitmap(other),
}

Expand Down
2 changes: 1 addition & 1 deletion crates/polars-io/src/predicates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ fn cast_to_parquet_scalar(scalar: Scalar) -> Option<ParquetScalar> {
A::Int16(v) => P::Int16(v),
A::Int32(v) => P::Int32(v),
A::Int64(v) => P::Int64(v),

#[cfg(feature = "dtype-time")]
A::Date(v) => P::Int32(v),
#[cfg(feature = "dtype-datetime")]
Expand Down
7 changes: 6 additions & 1 deletion crates/polars-parquet/src/arrow/read/deserialize/null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ impl utils::Decoder for NullDecoder {
todo!()
}

decoded.length += Filter::opt_num_rows(&filter, state.translation.num_rows);
let num_rows = match filter {
Some(f) => f.num_rows(0),
None => state.translation.num_rows,
};
decoded.length += num_rows;

Ok(())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ pub fn decode<P: ParquetNativeType, T: NativeType, D: DecoderFunction<P, T>>(
polars_compute::filter::filter_with_bitmap(&array, &intermediate_pred_true_mask);
let array = array.as_any().downcast_ref::<PrimitiveArray<T>>().unwrap();

pred_true_mask.extend_from_bitmap(&intermediate_pred_true_mask);
target.extend(array.values().iter().copied());
if is_optional {
match array.validity() {
Expand Down

0 comments on commit 332161a

Please sign in to comment.