Skip to content

Commit

Permalink
fix: Don't panic but set null type if type is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Jan 9, 2025
1 parent 323b88c commit 26d7375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/polars-core/src/series/ops/null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Series {
},
DataType::Null => Series::new_null(name, size),
DataType::Unknown(kind) => {
let dtype = kind.materialize().expect("expected known type");
let dtype = kind.materialize().unwrap_or(DataType::Null);
Series::full_null(name, size, &dtype)
},
#[cfg(feature = "object")]
Expand Down

0 comments on commit 26d7375

Please sign in to comment.