Skip to content

Commit

Permalink
Fix debug assert
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Jun 4, 2024
1 parent ac3ca3f commit 30635d8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/polars-core/src/chunked_array/from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,8 @@ where
// that check if the data types in the arrays are as expected
#[cfg(debug_assertions)]
{
if !chunks.is_empty() && dtype.is_primitive() {
assert_eq!(
chunks[0].data_type().underlying_physical_type(),
dtype.to_arrow(true)
)
if !chunks.is_empty() && !chunks[0].is_empty() && dtype.is_primitive() {
assert_eq!(chunks[0].data_type(), &dtype.to_arrow(true))
}
}
let field = Arc::new(Field::new(name, dtype));
Expand Down

0 comments on commit 30635d8

Please sign in to comment.