Skip to content

Commit

Permalink
fix: Panic if invalid array in object
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Apr 15, 2024
1 parent 4e17d02 commit 72698c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/polars-core/src/chunked_array/ops/any_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub(crate) unsafe fn arr_to_any_value<'a>(
DataType::Object(_, _) => {
// We should almost never hit this. The only known exception is when we put objects in
// structs. Any other hit should be considered a bug.
let arr = &*(arr as *const dyn Array as *const FixedSizeBinaryArray);
let arr = arr.as_any().downcast_ref::<FixedSizeBinaryArray>().unwrap();
PolarsExtension::arr_to_av(arr, idx)
},
DataType::Null => AnyValue::Null,
Expand Down

0 comments on commit 72698c5

Please sign in to comment.