Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Compilation error with Categorical dtype #113

@niklasmueboe

Description

@niklasmueboe

Using pyo3-polars 0.17 with the dtype-categorical feature for polars seems to lead to compilation errors. Using pyo3-polars 0.15 works fine.

error[E0004]: non-exhaustive patterns: &DataType::Categorical(_, _) and &DataType::Enum(_, _) not covered
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-polars-0.17.0/src/types.rs:359:15
|
359 | match &self.0 {
| ^^^^^^^ patterns &DataType::Categorical(_, _) and &DataType::Enum(_, _) not covered
|
note: DataType defined here
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-core-0.43.1/src/datatypes/dtype.rs:44:1
|
44 | pub enum DataType {
| ^^^^^^^^^^^^^^^^^
...
88 | Categorical(Option<Arc>, CategoricalOrdering),
| ----------- not covered
89 | #[cfg(feature = "dtype-categorical")]
90 | Enum(Option<Arc>, CategoricalOrdering),
| ---- not covered
= note: the matched value is of type &DataType
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
494 ~ },
495 + &DataType::Categorical(_, ) | &DataType::Enum(, _) => todo!()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions