Skip to content

Commit

Permalink
handle equality of categorical vs enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Collin Prince authored and Collin Prince committed Jan 28, 2024
1 parent 91ddc6c commit 373b7ee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion crates/polars-core/src/datatypes/dtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ impl PartialEq for DataType {
use DataType::*;
{
match (self, other) {
// Don't include rev maps in comparisons
#[cfg(feature = "dtype-categorical")]
(Categorical(_, _), Categorical(_, _)) | (Enum(_, _), Enum(_, _)) => true,
(Datetime(tu_l, tz_l), Datetime(tu_r, tz_r)) => tu_l == tu_r && tz_l == tz_r,
Expand Down
2 changes: 1 addition & 1 deletion py-polars/tests/unit/datatypes/test_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def test_enum_creating_col_expr() -> None:
},
schema={
"col1": pl.Enum(["a", "b", "c"]),
"col2": pl.String,
"col2": pl.Categorical(),
"col3": pl.Enum(["g", "h", "i"]),
},
)
Expand Down

0 comments on commit 373b7ee

Please sign in to comment.