Skip to content

Commit

Permalink
fix(rust): AnyValue::StructOwned panic when hashing (pola-rs#13553)
Browse files Browse the repository at this point in the history
Co-authored-by: Collin Prince <[email protected]>
  • Loading branch information
collinprince and Collin Prince authored Jan 9, 2024
1 parent 67507ff commit 65cc93f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/polars-core/src/datatypes/any_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,13 +651,15 @@ impl AnyValue<'_> {
#[cfg(feature = "object")]
ObjectOwned(_) => {},
#[cfg(feature = "dtype-struct")]
Struct(_, _, _) | StructOwned(_) => {
Struct(_, _, _) => {
if !cheap {
let mut buf = vec![];
self._materialize_struct_av(&mut buf);
buf.hash(state)
}
},
#[cfg(feature = "dtype-struct")]
StructOwned(v) => v.0.hash(state),
#[cfg(feature = "dtype-decimal")]
Decimal(v, k) => {
v.hash(state);
Expand Down

0 comments on commit 65cc93f

Please sign in to comment.