explorer icon indicating copy to clipboard operation
explorer copied to clipboard

"Category" bugs have been solved in recent versions of Polars (upgrade needed!)

Open thbar opened this issue 2 weeks ago • 1 comments

I am unsure how involved the upgrade will be, but creating an issue to share what I found.

After finding data corruption when doing things like:

defmodule DataFrameAdapter do
  @dtypes [
    {:level, {:u, 8}},
    {:node, :category},
    {:text, :category},
    {:attributes, {:list, {:struct, [name: :category, value: :category]}}}
  ]

where unit tests showed that the "value" field in our attributes were sometimes corrupt, I did a bit of digging.

It appears that the whole family of similar bugs has been fixed here:

  • https://github.com/pola-rs/polars/pull/23016

Our version of Polars (rust crate) is set here:

https://github.com/elixir-explorer/explorer/blob/607ed7f92aa0f19bf348d5bbaae3be07bef92d1d/native/explorer/Cargo.toml#L30

I could not find release notes for the Rust crate (only for the Python library), but found out you can use tags here to compare, FWIW:

https://github.com/pola-rs/polars/compare/rs-0.49.0...rs-0.52.0

thbar avatar Dec 14 '25 10:12 thbar

I started poking around with an upgrade to 0.50 : it is already a bit involved, but at a quick glance I believe it would include the category fixes.

thbar avatar Dec 15 '25 09:12 thbar

Rust release notes are also in GitHub releases, mixed in with the Python releases, but there's so many Python releases that the rust ones get buried and hard to find. Here's direct links to all the releases since 0.49.1 https://github.com/pola-rs/polars/releases/tag/rs-0.50.0 https://github.com/pola-rs/polars/releases/tag/rs-0.51.0 https://github.com/pola-rs/polars/releases/tag/rs-0.52.0

skyqrose avatar Dec 18 '25 14:12 skyqrose

I also started poking around with a upgrade to 0.50, but it is indeed a bit involved. There are 67 compile errors (29 after removing duplicates), and the release notes don't give any guidance on how to upgrade.

Compiler output with 67 errors
    Checking explorer v0.1.0 (~/git/explorer/native/explorer)
error[E0432]: unresolved import `polars::datatypes::CategoricalOrdering`
 --> src/datatypes/ex_dtypes.rs:2:5
  |
2 | use polars::datatypes::CategoricalOrdering;
  |     ^^^^^^^^^^^^^^^^^^^-------------------
  |     |                  |
  |     |                  help: a similar name exists in the module: `CategoricalMapping`
  |     no `CategoricalOrdering` in `datatypes`

error[E0412]: cannot find type `RevMapping` in this scope
   --> src/encoding.rs:596:19
    |
596 |     mapping: &Arc<RevMapping>,
    |                   ^^^^^^^^^^ not found in this scope
    |
help: you might be missing a type parameter
    |
593 | fn categorical_series_to_list<'b, RevMapping>(
    |                                 ++++++++++++

error[E0061]: this method takes 3 arguments but 2 arguments were supplied
   --> src/dataframe.rs:377:27
    |
377 |         .and_then(|df| df.to_dummies(None, drop_first))?;
    |                           ^^^^^^^^^^------------------ argument #3 of type `bool` is missing
    |
note: method defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.50.0/src/frame/mod.rs:73:8
    |
73  |     fn to_dummies(
    |        ^^^^^^^^^^
help: provide the argument
    |
377 |         .and_then(|df| df.to_dummies(None, drop_first, /* bool */))?;
    |                                                      ++++++++++++

error[E0599]: no associated item named `First` found for struct `polars_ops::pivot::PivotAgg` in the current scope
   --> src/dataframe.rs:461:24
    |
461 |         Some(PivotAgg::First),
    |                        ^^^^^ associated item not found in `polars_ops::pivot::PivotAgg`

error[E0308]: mismatched types
   --> src/datatypes/ex_dtypes.rs:120:42
    |
120 |                 Ok(DataType::Categorical(None, CategoricalOrdering::default()))
    |                    --------------------- ^^^^ expected `Arc<Categories>`, found `Option<_>`
    |                    |
    |                    arguments to this enum variant are incorrect
    |
    = note: expected struct `std::sync::Arc<polars::prelude::Categories>`
                 found enum `std::option::Option<_>`
note: tuple variant defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/datatypes/dtype.rs:133:5
    |
133 |     Categorical(Arc<Categories>, Arc<CategoricalMapping>),
    |     ^^^^^^^^^^^

error[E0599]: the method `into_iter` exists for reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`, but its trait bounds were not satisfied
  --> src/encoding.rs:99:19
   |
99 |         s.date()?.into_iter().map(|option| option
   |                   ^^^^^^^^^
   |
  ::: ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/mod.rs:34:1
   |
34 | pub struct Logical<Logical: PolarsDataType, Physical: PolarsDataType> {
   | --------------------------------------------------------------------- doesn't satisfy `_: IntoIterator` or `_: Iterator`
   |
   = note: the following trait bounds were not satisfied:
           `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`
           `&&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `&&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`
           `&mut &polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `&mut &polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`
           `polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`
           `&mut polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `&mut polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`

error[E0599]: the method `into_iter` exists for reference `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>`, but its trait bounds were not satisfied
   --> src/encoding.rs:195:23
    |
195 |         s.datetime()?.into_iter().map(|opt_timestamp| opt_timestamp
    |                       ^^^^^^^^^
    |
   ::: ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/mod.rs:34:1
    |
34  | pub struct Logical<Logical: PolarsDataType, Physical: PolarsDataType> {
    | --------------------------------------------------------------------- doesn't satisfy `_: IntoIterator` or `_: Iterator`
    |
    = note: the following trait bounds were not satisfied:
            `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&mut &polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&mut &polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&mut polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&mut polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`

error[E0599]: the method `into_iter` exists for reference `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>`, but its trait bounds were not satisfied
   --> src/encoding.rs:317:23
    |
317 |         s.datetime()?.into_iter().map(|opt_timestamp| opt_timestamp
    |                       ^^^^^^^^^
    |
   ::: ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/mod.rs:34:1
    |
34  | pub struct Logical<Logical: PolarsDataType, Physical: PolarsDataType> {
    | --------------------------------------------------------------------- doesn't satisfy `_: IntoIterator` or `_: Iterator`
    |
    = note: the following trait bounds were not satisfied:
            `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&mut &polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&mut &polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&mut polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&mut polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`

error[E0599]: the method `into_iter` exists for reference `&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>`, but its trait bounds were not satisfied
   --> src/encoding.rs:400:23
    |
400 |         s.duration()?.into_iter().map(|option| option
    |                       ^^^^^^^^^
    |
   ::: ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/mod.rs:34:1
    |
34  | pub struct Logical<Logical: PolarsDataType, Physical: PolarsDataType> {
    | --------------------------------------------------------------------- doesn't satisfy `_: IntoIterator` or `_: Iterator`
    |
    = note: the following trait bounds were not satisfied:
            `&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&mut &polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&mut &polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&mut polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&mut polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>: std::iter::IntoIterator`

error[E0599]: the method `into_iter` exists for reference `&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>`, but its trait bounds were not satisfied
   --> src/encoding.rs:471:25
    |
471 |         decimal_chunked.into_iter().map(|option| option
    |                         ^^^^^^^^^
    |
   ::: ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/mod.rs:34:1
    |
34  | pub struct Logical<Logical: PolarsDataType, Physical: PolarsDataType> {
    | --------------------------------------------------------------------- doesn't satisfy `_: IntoIterator` or `_: Iterator`
    |
    = note: the following trait bounds were not satisfied:
            `&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::Iterator`
            which is required by `&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::IntoIterator`
            `&&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::Iterator`
            which is required by `&&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::IntoIterator`
            `&mut &polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::Iterator`
            which is required by `&mut &polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::IntoIterator`
            `polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::Iterator`
            which is required by `polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::IntoIterator`
            `&mut polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::Iterator`
            which is required by `&mut polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>: std::iter::IntoIterator`

error[E0599]: the method `into_iter` exists for reference `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>`, but its trait bounds were not satisfied
   --> src/encoding.rs:550:19
    |
550 |         s.time()?.into_iter().map(|option| option
    |                   ^^^^^^^^^
    |
   ::: ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/mod.rs:34:1
    |
34  | pub struct Logical<Logical: PolarsDataType, Physical: PolarsDataType> {
    | --------------------------------------------------------------------- doesn't satisfy `_: IntoIterator` or `_: Iterator`
    |
    = note: the following trait bounds were not satisfied:
            `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&mut &polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&mut &polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`
            `&mut polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::Iterator`
            which is required by `&mut polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>: std::iter::IntoIterator`

error[E0599]: no method named `categorical` found for reference `&polars::prelude::Series` in the current scope
   --> src/encoding.rs:602:21
    |
602 |     let logical = s.categorical()?.physical();
    |                     ^^^^^^^^^^^ method not found in `&polars::prelude::Series`

error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
   --> src/encoding.rs:738:31
    |
738 |         AnyValue::Categorical(idx, mapping, _) => Ok(mapping.get(idx).encode(env)),
    |                               ^^^  ^^^^^^^  ^ expected 2 fields, found 3
    |
   ::: ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/datatypes/any_value.rs:74:17
    |
74  |     Categorical(CatSize, &'a Arc<CategoricalMapping>),
    |                 -------  --------------------------- tuple variant has 2 fields

error[E0308]: mismatched types
   --> src/encoding.rs:802:31
    |
777 |     match s.dtype() {
    |           --------- this expression has type `&polars::prelude::DataType`
...
802 |         DataType::Categorical(Some(mapping), _) => categorical_series_to_list(&s, env, mapping),
    |                               ^^^^^^^^^^^^^ expected `Arc<Categories>`, found `Option<_>`
    |
    = note: expected struct `std::sync::Arc<polars::prelude::Categories>`
                 found enum `std::option::Option<_>`

error[E0308]: mismatched types
   --> src/encoding.rs:854:31
    |
827 |     match s.dtype() {
    |           --------- this expression has type `&polars::prelude::DataType`
...
854 |         DataType::Categorical(Some(_), _) => {
    |                               ^^^^^^^ expected `Arc<Categories>`, found `Option<_>`
    |
    = note: expected struct `std::sync::Arc<polars::prelude::Categories>`
                 found enum `std::option::Option<_>`

error[E0599]: no method named `downcast_iter` found for reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>` in the current scope
   --> src/encoding.rs:691:37
    |
691 |             $s.$convert_function()?.downcast_iter().map(|array| {
    |                                     ^^^^^^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`
...
846 |         DataType::Date => series_to_iovec!(resource, s, env, date, i32),
    |                           --------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `series_to_iovec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no method named `downcast_iter` found for reference `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>` in the current scope
   --> src/encoding.rs:691:37
    |
691 |             $s.$convert_function()?.downcast_iter().map(|array| {
    |                                     ^^^^^^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>`
...
847 |         DataType::Time => series_to_iovec!(resource, s, env, time, i64),
    |                           --------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `series_to_iovec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no method named `downcast_iter` found for reference `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>` in the current scope
   --> src/encoding.rs:691:37
    |
691 |             $s.$convert_function()?.downcast_iter().map(|array| {
    |                                     ^^^^^^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>`
...
849 |             series_to_iovec!(resource, s, env, datetime, i64)
    |             ------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `series_to_iovec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no method named `downcast_iter` found for reference `&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>` in the current scope
   --> src/encoding.rs:691:37
    |
691 |             $s.$convert_function()?.downcast_iter().map(|array| {
    |                                     ^^^^^^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>`
...
852 |             series_to_iovec!(resource, s, env, duration, i64)
    |             ------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `series_to_iovec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0061]: this method takes 2 arguments but 1 argument was supplied
   --> src/expressions.rs:819:22
    |
819 |     ExExpr::new(expr.arg_sort(opts))
    |                      ^^^^^^^^------
    |                              ||
    |                              |expected `bool`, found `SortOptions`
    |                              argument #2 of type `bool` is missing
    |
note: method defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.50.0/src/dsl/mod.rs:263:12
    |
263 |     pub fn arg_sort(self, descending: bool, nulls_last: bool) -> Self {
    |            ^^^^^^^^
help: provide the argument
    |
819 -     ExExpr::new(expr.arg_sort(opts))
819 +     ExExpr::new(expr.arg_sort(/* bool */, /* bool */))
    |

error[E0308]: mismatched types
  --> src/lazyframe/io.rs:24:14
   |
24 |         vec![all()]
   |              ^^^^^ expected `Expr`, found `Selector`
   |
help: try wrapping the expression in `polars::prelude::Expr::Selector`
   |
24 |         vec![polars::prelude::Expr::Selector(all())]
   |              ++++++++++++++++++++++++++++++++     +

error[E0308]: mismatched types
   --> src/lazyframe/io.rs:27:38
    |
27  |     let lf = LazyFrame::scan_parquet(filename, options)?.select(cols);
    |              ----------------------- ^^^^^^^^ expected `PlPath`, found `&str`
    |              |
    |              arguments to this function are incorrect
    |
note: associated function defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/scan/parquet.rs:164:12
    |
164 |     pub fn scan_parquet(path: PlPath, args: ScanArgsParquet) -> PolarsResult<Self> {
    |            ^^^^^^^^^^^^

error[E0308]: mismatched types
  --> src/lazyframe/io.rs:48:14
   |
48 |         vec![all()]
   |              ^^^^^ expected `Expr`, found `Selector`
   |
help: try wrapping the expression in `polars::prelude::Expr::Selector`
   |
48 |         vec![polars::prelude::Expr::Selector(all())]
   |              ++++++++++++++++++++++++++++++++     +

error[E0308]: mismatched types
   --> src/lazyframe/io.rs:50:38
    |
50  |     let lf = LazyFrame::scan_parquet(ex_entry.to_string(), options)?
    |              ----------------------- ^^^^^^^^^^^^^^^^^^^^ expected `PlPath`, found `String`
    |              |
    |              arguments to this function are incorrect
    |
note: associated function defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/scan/parquet.rs:164:12
    |
164 |     pub fn scan_parquet(path: PlPath, args: ScanArgsParquet) -> PolarsResult<Self> {
    |            ^^^^^^^^^^^^

error[E0277]: the trait bound `polars::prelude::PlPath: std::convert::From<std::path::PathBuf>` is not satisfied
  --> src/lazyframe/io.rs:97:51
   |
97 |             .sink_parquet(SinkTarget::Path(target.into()), options, None, sink_options)?
   |                                                   ^^^^ the trait `std::convert::From<std::path::PathBuf>` is not implemented for `polars::prelude::PlPath`
   |
   = note: required for `std::path::PathBuf` to implement `std::convert::Into<polars::prelude::PlPath>`

error[E0277]: the trait bound `polars::prelude::PlPath: std::convert::From<std::path::PathBuf>` is not satisfied
   --> src/lazyframe/io.rs:141:37
    |
141 |             SinkTarget::Path(target.into()),
    |                                     ^^^^ the trait `std::convert::From<std::path::PathBuf>` is not implemented for `polars::prelude::PlPath`
    |
    = note: required for `std::path::PathBuf` to implement `std::convert::Into<polars::prelude::PlPath>`

error[E0308]: mismatched types
   --> src/lazyframe/io.rs:164:34
    |
164 |     let lf = LazyFrame::scan_ipc(filename, Default::default())?;
    |              ------------------- ^^^^^^^^ expected `PlPath`, found `&str`
    |              |
    |              arguments to this function are incorrect
    |
note: associated function defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/scan/ipc.rs:139:12
    |
139 |     pub fn scan_ipc(path: PlPath, args: ScanArgsIpc) -> PolarsResult<Self> {
    |            ^^^^^^^^

error[E0277]: the trait bound `polars::prelude::PlPath: std::convert::From<std::path::PathBuf>` is not satisfied
   --> src/lazyframe/io.rs:197:47
    |
197 |             .sink_ipc(SinkTarget::Path(target.into()), options, None, sink_options)?
    |                                               ^^^^ the trait `std::convert::From<std::path::PathBuf>` is not implemented for `polars::prelude::PlPath`
    |
    = note: required for `std::path::PathBuf` to implement `std::convert::Into<polars::prelude::PlPath>`

error[E0277]: the trait bound `polars::prelude::PlPath: std::convert::From<std::path::PathBuf>` is not satisfied
   --> src/lazyframe/io.rs:239:37
    |
239 |             SinkTarget::Path(target.into()),
    |                                     ^^^^ the trait `std::convert::From<std::path::PathBuf>` is not implemented for `polars::prelude::PlPath`
    |
    = note: required for `std::path::PathBuf` to implement `std::convert::Into<polars::prelude::PlPath>`

error[E0308]: mismatched types
   --> src/lazyframe/io.rs:272:33
    |
272 |     let df = LazyCsvReader::new(filename)
    |              ------------------ ^^^^^^^^ expected `PlPath`, found `&str`
    |              |
    |              arguments to this function are incorrect
    |
note: associated function defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/scan/csv.rs:53:12
    |
53  |     pub fn new(path: PlPath) -> Self {
    |            ^^^

error[E0277]: the trait bound `polars::prelude::PlPath: std::convert::From<std::path::PathBuf>` is not satisfied
   --> src/lazyframe/io.rs:323:47
    |
323 |             .sink_csv(SinkTarget::Path(target.into()), options, None, sink_options)?
    |                                               ^^^^ the trait `std::convert::From<std::path::PathBuf>` is not implemented for `polars::prelude::PlPath`
    |
    = note: required for `std::path::PathBuf` to implement `std::convert::Into<polars::prelude::PlPath>`

error[E0308]: mismatched types
   --> src/lazyframe/io.rs:351:38
    |
351 |     let lf = LazyJsonLineReader::new(filename)
    |              ----------------------- ^^^^^^^^ expected `PlPath`, found `String`
    |              |
    |              arguments to this function are incorrect
    |
note: associated function defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/scan/ndjson.rs:55:12
    |
55  |     pub fn new(path: PlPath) -> Self {
    |            ^^^

error[E0599]: no method named `fetch` found for struct `polars::prelude::LazyFrame` in the current scope
  --> src/lazyframe.rs:45:44
   |
45 |     Ok(ExDataFrame::new(data.clone_inner().fetch(n_rows)?))
   |                                            ^^^^^ method not found in `polars::prelude::LazyFrame`

error[E0277]: the trait bound `[polars::prelude::Selector; 1]: std::convert::AsRef<[polars::prelude::Expr]>` is not satisfied
    --> src/lazyframe.rs:120:41
     |
120  |     let lf = data.clone_inner().select(&[cols(columns)]);
     |                                 ------  ^^^^^^^^^^^^^^^ the trait `std::convert::AsRef<[polars::prelude::Expr]>` is not implemented for `[polars::prelude::Selector; 1]`
     |                                 |
     |                                 required by a bound introduced by this call
     |
     = help: the following other types implement trait `std::convert::AsRef<T>`:
               `&[<T as zerovec::ule::AsULE>::ULE]` implements `std::convert::AsRef<zerovec::zerovec::slice::ZeroSlice<T>>`
               `[T; N]` implements `std::convert::AsRef<[T]>`
               `[T]` implements `std::convert::AsRef<[T]>`
     = note: required for `&[polars::prelude::Selector; 1]` to implement `std::convert::AsRef<[polars::prelude::Expr]>`
note: required by a bound in `polars::prelude::LazyFrame::select`
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/frame/mod.rs:1198:22
     |
1198 |     pub fn select<E: AsRef<[Expr]>>(self, exprs: E) -> Self {
     |                      ^^^^^^^^^^^^^ required by this bound in `LazyFrame::select`

error[E0599]: no method named `exclude` found for enum `polars::prelude::Expr` in the current scope
   --> src/lazyframe.rs:126:51
    |
126 |     let lf = data.clone_inner().select(&[col("*").exclude(columns)]);
    |                                                   ^^^^^^^
    |
help: there is a method `explode` with a similar name, but with different arguments
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.50.0/src/dsl/mod.rs:203:5
    |
203 |     pub fn explode(self) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no method named `exclude` found for enum `polars::prelude::Expr` in the current scope
   --> src/lazyframe.rs:145:32
    |
145 |             .explode([col("*").exclude(groups)])
    |                                ^^^^^^^
    |
help: there is a method `explode` with a similar name, but with different arguments
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.50.0/src/dsl/mod.rs:203:5
    |
203 |     pub fn explode(self) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> src/lazyframe.rs:153:41
     |
153  |     let lf = data.clone_inner().explode(columns);
     |                                 ------- ^^^^^^^ expected `Selector`, found `Vec<&str>`
     |                                 |
     |                                 arguments to this method are incorrect
     |
     = note: expected enum `polars::prelude::Selector`
              found struct `std::vec::Vec<&str>`
note: method defined here
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/frame/mod.rs:1800:12
     |
1800 |     pub fn explode(self, columns: Selector) -> LazyFrame {
     |            ^^^^^^^

error[E0308]: mismatched types
    --> src/lazyframe.rs:159:40
     |
159  |     let lf = data.clone_inner().unnest(columns);
     |                                 ------ ^^^^^^^ expected `Selector`, found `Vec<&str>`
     |                                 |
     |                                 arguments to this method are incorrect
     |
     = note: expected enum `polars::prelude::Selector`
              found struct `std::vec::Vec<&str>`
note: method defined here
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/frame/mod.rs:2055:12
     |
2055 |     pub fn unnest(self, cols: Selector) -> Self {
     |            ^^^^^^

error[E0308]: mismatched types
   --> src/lazyframe.rs:216:40
    |
216 |     let new_df = df.unique_stable(Some(subset), UniqueKeepStrategy::First);
    |                                   ---- ^^^^^^ expected `Selector`, found `Vec<PlSmallStr>`
    |                                   |
    |                                   arguments to this enum variant are incorrect
    |
    = note: expected enum `polars::prelude::Selector`
             found struct `std::vec::Vec<polars::prelude::PlSmallStr>`
help: the type constructed contains `std::vec::Vec<polars::prelude::PlSmallStr>` due to the type of the argument passed
   --> src/lazyframe.rs:216:35
    |
216 |     let new_df = df.unique_stable(Some(subset), UniqueKeepStrategy::First);
    |                                   ^^^^^------^
    |                                        |
    |                                        this argument influences the type of `Some`
note: tuple variant defined here
   --> /rustc/be19eda0dc4c22c5cf5f1b48fd163acf9bd4b0a6/library/core/src/option.rs:599:5

error[E0599]: no method named `exclude` found for enum `polars::prelude::Expr` in the current scope
   --> src/lazyframe.rs:260:28
    |
260 |         .select(&[col("*").exclude(["__explorer_literal_for_group__"])])
    |                            ^^^^^^^
    |
help: there is a method `explode` with a similar name, but with different arguments
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.50.0/src/dsl/mod.rs:203:5
    |
203 |     pub fn explode(self) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> src/lazyframe.rs:287:40
     |
287  |     Ok(ExLazyFrame::new(ldf.drop_nulls(columns)))
     |                             ---------- ^^^^^^^ expected `Option<Selector>`, found `Option<Vec<Expr>>`
     |                             |
     |                             arguments to this method are incorrect
     |
     = note: expected enum `std::option::Option<polars::prelude::Selector>`
                found enum `std::option::Option<std::vec::Vec<polars::prelude::Expr>>`
note: method defined here
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/frame/mod.rs:1886:12
     |
1886 |     pub fn drop_nulls(self, subset: Option<Selector>) -> LazyFrame {
     |            ^^^^^^^^^^

error[E0308]: mismatched types
   --> src/lazyframe.rs:300:16
    |
300 |         index: to_lazy_selectors(id_vars),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Selector`, found `Vec<Selector>`
    |
    = note: expected enum `polars::prelude::Selector`
             found struct `std::vec::Vec<polars::prelude::Selector>`

error[E0308]: mismatched types
   --> src/lazyframe.rs:301:13
    |
301 |         on: to_lazy_selectors(value_vars),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Selector`, found `Vec<Selector>`
    |
    = note: expected enum `polars::prelude::Selector`
             found struct `std::vec::Vec<polars::prelude::Selector>`

error[E0631]: type mismatch in function arguments
   --> src/lazyframe.rs:312:14
    |
312 |         .map(Selector::from)
    |          --- ^^^^^^^^^^^^^^
    |          |   |
    |          |   expected due to this
    |          |   found signature defined here
    |          required by a bound introduced by this call
    |
    = note: expected function signature `fn(std::string::String) -> _`
               found function signature `fn(polars::prelude::Selector) -> _`
note: required by a bound in `std::iter::Iterator::map`
   --> /rustc/be19eda0dc4c22c5cf5f1b48fd163acf9bd4b0a6/library/core/src/iter/traits/iterator.rs:772:5
help: consider wrapping the function in a closure
    |
312 |         .map(|arg0: std::string::String| Selector::from(/* polars::prelude::Selector */))
    |              +++++++++++++++++++++++++++               +++++++++++++++++++++++++++++++++

error[E0599]: the method `collect` exists for struct `Map<IntoIter<String>, fn(Selector) -> ... {<... as From<...>>::from}>`, but its trait bounds were not satisfied
   --> src/lazyframe.rs:313:10
    |
310 | /     values
311 | |         .into_iter()
312 | |         .map(Selector::from)
313 | |         .collect::<Vec<Selector>>()
    | |         -^^^^^^^ method cannot be called due to unsatisfied trait bounds
    | |_________|
    |
    |
    = note: the following trait bounds were not satisfied:
            `<fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from} as std::ops::FnOnce<(std::string::String,)>>::Output = _`
            which is required by `std::iter::Map<std::vec::IntoIter<std::string::String>, fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}>: std::iter::Iterator`
            `fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}: std::ops::FnMut<(std::string::String,)>`
            which is required by `std::iter::Map<std::vec::IntoIter<std::string::String>, fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}>: std::iter::Iterator`
            `std::iter::Map<std::vec::IntoIter<std::string::String>, fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}>: std::iter::Iterator`
            which is required by `&mut std::iter::Map<std::vec::IntoIter<std::string::String>, fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}>: std::iter::Iterator`

error[E0308]: mismatched types
   --> src/lazyframe.rs:400:29
    |
400 |           .how(JoinType::AsOf(AsOfOptions {
    |  ______________--------------_^
    | |              |
    | |              arguments to this enum variant are incorrect
401 | |             strategy,
402 | |             tolerance: None,
...   |
410 | |             check_sortedness: false,
411 | |         }))
    | |_________^ expected `Box<AsOfOptions>`, found `AsOfOptions`
    |
    = note: expected struct `std::boxed::Box<polars::prelude::AsOfOptions>`
               found struct `polars::prelude::AsOfOptions`
    = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
note: tuple variant defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.50.0/src/frame/join/args.rs:52:5
    |
52  |     AsOf(Box<AsOfOptions>),
    |     ^^^^
help: store this in the heap by calling `Box::new`
    |
400 ~         .how(JoinType::AsOf(Box::new(AsOfOptions {
401 |             strategy,
...
410 |             check_sortedness: false,
411 ~         })))
    |

error[E0433]: failed to resolve: use of undeclared type `CategoricalOrdering`
   --> src/series/from_list.rs:399:48
    |
399 |             .cast(&DataType::Categorical(None, CategoricalOrdering::default()))
    |                                                ^^^^^^^^^^^^^^^^^^^
    |                                                |
    |                                                use of undeclared type `CategoricalOrdering`
    |                                                help: a struct with a similar name exists: `CategoricalMapping`

error[E0308]: mismatched types
   --> src/series/from_list.rs:399:42
    |
399 |             .cast(&DataType::Categorical(None, CategoricalOrdering::default()))
    |                    --------------------- ^^^^ expected `Arc<Categories>`, found `Option<_>`
    |                    |
    |                    arguments to this enum variant are incorrect
    |
    = note: expected struct `std::sync::Arc<polars::prelude::Categories>`
                 found enum `std::option::Option<_>`
note: tuple variant defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/datatypes/dtype.rs:133:5
    |
133 |     Categorical(Arc<Categories>, Arc<CategoricalMapping>),
    |     ^^^^^^^^^^^

error[E0599]: no method named `fill_null_with_values` found for reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>` in the current scope
   --> src/series.rs:590:10
    |
588 |       let s = series
    |  _____________-
589 | |         .date()?
590 | |         .fill_null_with_values(date.into())?
    | |         -^^^^^^^^^^^^^^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`
    | |_________|
    |
    |
help: one of the expressions' fields has a method of the same name
    |
590 |         .phys.fill_null_with_values(date.into())?
    |          +++++

error[E0599]: no method named `fill_null_with_values` found for reference `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>` in the current scope
   --> src/series.rs:610:10
    |
608 |       let s = series
    |  _____________-
609 | |         .datetime()?
610 | |         .fill_null_with_values(timestamp)?
    | |         -^^^^^^^^^^^^^^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>`
    | |_________|
    |
    |
help: one of the expressions' fields has a method of the same name
    |
610 |         .phys.fill_null_with_values(timestamp)?
    |          +++++

error[E0599]: no method named `quantile` found for reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>` in the current scope
    --> src/series.rs:1101:43
     |
1101 |         DataType::Date => match s.date()?.quantile(quantile, strategy)? {
     |                                           ^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`
     |
help: one of the expressions' fields has a method of the same name
     |
1101 |         DataType::Date => match s.date()?.phys.quantile(quantile, strategy)? {
     |                                           +++++

error[E0599]: no method named `quantile` found for reference `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>` in the current scope
    --> src/series.rs:1105:43
     |
1105 |         DataType::Time => match s.time()?.quantile(quantile, strategy)? {
     |                                           ^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>`
     |
help: one of the expressions' fields has a method of the same name
     |
1105 |         DataType::Time => match s.time()?.phys.quantile(quantile, strategy)? {
     |                                           +++++

error[E0599]: no method named `quantile` found for reference `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>` in the current scope
    --> src/series.rs:1109:63
     |
1109 |         DataType::Datetime(unit, None) => match s.datetime()?.quantile(quantile, strategy)? {
     |                                                               ^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>`
     |
help: one of the expressions' fields has a method of the same name
     |
1109 |         DataType::Datetime(unit, None) => match s.datetime()?.phys.quantile(quantile, strategy)? {
     |                                                               +++++

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1141:45
     |
1141 |         DataType::Decimal(_, _) => peak_max(s.decimal()?),
     |                                             ^^^^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<DecimalType, Int128Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>`

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1143:36
     |
1143 |         DataType::Date => peak_max(s.date()?),
     |                                    ^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<DateType, Int32Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1144:36
     |
1144 |         DataType::Time => peak_max(s.time()?),
     |                                    ^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<TimeType, Int64Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>`

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1145:53
     |
1145 |         DataType::Datetime(_unit, None) => peak_max(s.datetime()?),
     |                                                     ^^^^^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<DatetimeType, Int64Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>`

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1146:47
     |
1146 |         DataType::Duration(_unit) => peak_max(s.duration()?),
     |                                               ^^^^^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<DurationType, Int64Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>`

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1168:45
     |
1168 |         DataType::Decimal(_, _) => peak_min(s.decimal()?),
     |                                             ^^^^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<DecimalType, Int128Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>`

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1170:36
     |
1170 |         DataType::Date => peak_min(s.date()?),
     |                                    ^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<DateType, Int32Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1171:36
     |
1171 |         DataType::Time => peak_min(s.time()?),
     |                                    ^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<TimeType, Int64Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::TimeType, polars::prelude::Int64Type>`

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1172:53
     |
1172 |         DataType::Datetime(_unit, None) => peak_min(s.datetime()?),
     |                                                     ^^^^^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<DatetimeType, Int64Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::DatetimeType, polars::prelude::Int64Type>`

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1173:47
     |
1173 |         DataType::Duration(_unit) => peak_min(s.duration()?),
     |                                               ^^^^^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<DurationType, Int64Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::DurationType, polars::prelude::Int64Type>`

error[E0308]: mismatched types
    --> src/series.rs:1217:31
     |
1216 |     match s.dtype() {
     |           --------- this expression has type `&polars::prelude::DataType`
1217 |         DataType::Categorical(Some(mapping), _) => {
     |                               ^^^^^^^^^^^^^ expected `Arc<Categories>`, found `Option<_>`
     |
     = note: expected struct `std::sync::Arc<polars::prelude::Categories>`
                  found enum `std::option::Option<_>`

error[E0308]: mismatched types
    --> src/series.rs:1230:31
     |
1229 |     match cat.dtype() {
     |           ----------- this expression has type `&polars::prelude::DataType`
1230 |         DataType::Categorical(Some(mapping), _) => {
     |                               ^^^^^^^^^^^^^ expected `Arc<Categories>`, found `Option<_>`
     |
     = note: expected struct `std::sync::Arc<polars::prelude::Categories>`
                  found enum `std::option::Option<_>`

error[E0599]: no function or associated item named `from_cats_and_rev_map_unchecked` found for struct `polars::prelude::Logical` in the current scope
    --> src/series.rs:1255:37
     |
1255 |                 CategoricalChunked::from_cats_and_rev_map_unchecked(
     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `polars::prelude::Logical<_, _>`
     |
note: if you're trying to build a new `polars::prelude::Logical<_, _>` consider using one of the following associated functions:
      polars::prelude::categorical::<impl polars::prelude::Logical<T, <T as polars::prelude::PolarsCategoricalType>::PolarsPhysical>>::full_null_with_dtype
      polars::prelude::categorical::<impl polars::prelude::Logical<T, <T as polars::prelude::PolarsCategoricalType>::PolarsPhysical>>::from_cats_and_dtype
      polars::prelude::categorical::<impl polars::prelude::Logical<T, <T as polars::prelude::PolarsCategoricalType>::PolarsPhysical>>::from_cats_and_dtype_unchecked
      polars::prelude::categorical::<impl polars::prelude::Logical<T, <T as polars::prelude::PolarsCategoricalType>::PolarsPhysical>>::from_str_iter
      and 9 others
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/categorical.rs:62:5
     |
62   |       pub fn full_null_with_dtype(name: PlSmallStr, length: usize, dtype: DataType) -> Self {
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
71   | /     pub fn from_cats_and_dtype(
72   | |         mut cat_ids: ChunkedArray<T::PolarsPhysical>,
73   | |         dtype: DataType,
74   | |     ) -> Self {
     | |_____________^
...
117  | /     pub unsafe fn from_cats_and_dtype_unchecked(
118  | |         cat_ids: ChunkedArray<T::PolarsPhysical>,
119  | |         dtype: DataType,
120  | |     ) -> Self {
     | |_____________^
...
149  | /     pub fn from_str_iter<'a, I: IntoIterator<Item = Option<&'a str>>>(
150  | |         name: PlSmallStr,
151  | |         dtype: DataType,
152  | |         strings: I,
153  | |     ) -> PolarsResult<Self> {
     | |___________________________^
help: there is an associated function `from_cats_and_dtype_unchecked` with a similar name
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/categorical.rs:117:5
     |
117  | /     pub unsafe fn from_cats_and_dtype_unchecked(
118  | |         cat_ids: ChunkedArray<T::PolarsPhysical>,
119  | |         dtype: DataType,
120  | |     ) -> Self {
     | |_____________^

error[E0433]: failed to resolve: use of undeclared type `CategoricalOrdering`
    --> src/series.rs:1259:21
     |
1259 |                     CategoricalOrdering::default(),
     |                     ^^^^^^^^^^^^^^^^^^^
     |                     |
     |                     use of undeclared type `CategoricalOrdering`
     |                     help: a struct with a similar name exists: `CategoricalMapping`

Some errors have detailed explanations: E0023, E0061, E0277, E0308, E0412, E0432, E0433, E0599, E0631.
For more information about an error, try `rustc --explain E0023`.
error: could not compile `explorer` (lib) due to 67 previous errors
Duplicates removed, down to 29 unique errors
error[E0432]: unresolved import `polars::datatypes::CategoricalOrdering`
 --> src/datatypes/ex_dtypes.rs:2:5
  |
2 | use polars::datatypes::CategoricalOrdering;
  |     ^^^^^^^^^^^^^^^^^^^-------------------
  |     |                  |
  |     |                  help: a similar name exists in the module: `CategoricalMapping`
  |     no `CategoricalOrdering` in `datatypes`

error[E0412]: cannot find type `RevMapping` in this scope
   --> src/encoding.rs:596:19
    |
596 |     mapping: &Arc<RevMapping>,
    |                   ^^^^^^^^^^ not found in this scope
    |
help: you might be missing a type parameter
    |
593 | fn categorical_series_to_list<'b, RevMapping>(
    |                                 ++++++++++++

error[E0061]: this method takes 3 arguments but 2 arguments were supplied
   --> src/dataframe.rs:377:27
    |
377 |         .and_then(|df| df.to_dummies(None, drop_first))?;
    |                           ^^^^^^^^^^------------------ argument #3 of type `bool` is missing
    |
note: method defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.50.0/src/frame/mod.rs:73:8
    |
73  |     fn to_dummies(
    |        ^^^^^^^^^^
help: provide the argument
    |
377 |         .and_then(|df| df.to_dummies(None, drop_first, /* bool */))?;
    |                                                      ++++++++++++

error[E0599]: no associated item named `First` found for struct `polars_ops::pivot::PivotAgg` in the current scope
   --> src/dataframe.rs:461:24
    |
461 |         Some(PivotAgg::First),
    |                        ^^^^^ associated item not found in `polars_ops::pivot::PivotAgg`

error[E0308]: mismatched types
   --> src/datatypes/ex_dtypes.rs:120:42
    |
120 |                 Ok(DataType::Categorical(None, CategoricalOrdering::default()))
    |                    --------------------- ^^^^ expected `Arc<Categories>`, found `Option<_>`
    |                    |
    |                    arguments to this enum variant are incorrect
    |
    = note: expected struct `std::sync::Arc<polars::prelude::Categories>`
                 found enum `std::option::Option<_>`
note: tuple variant defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/datatypes/dtype.rs:133:5
    |
133 |     Categorical(Arc<Categories>, Arc<CategoricalMapping>),
    |     ^^^^^^^^^^^

error[E0599]: the method `into_iter` exists for reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`, but its trait bounds were not satisfied
  --> src/encoding.rs:99:19
   |
99 |         s.date()?.into_iter().map(|option| option
   |                   ^^^^^^^^^
   |
  ::: ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/mod.rs:34:1
   |
34 | pub struct Logical<Logical: PolarsDataType, Physical: PolarsDataType> {
   | --------------------------------------------------------------------- doesn't satisfy `_: IntoIterator` or `_: Iterator`
   |
   = note: the following trait bounds were not satisfied:
           `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`
           `&&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `&&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`
           `&mut &polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `&mut &polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`
           `polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`
           `&mut polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::Iterator`
           which is required by `&mut polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>: std::iter::IntoIterator`

error[E0599]: no method named `categorical` found for reference `&polars::prelude::Series` in the current scope
   --> src/encoding.rs:602:21
    |
602 |     let logical = s.categorical()?.physical();
    |                     ^^^^^^^^^^^ method not found in `&polars::prelude::Series`

error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
   --> src/encoding.rs:738:31
    |
738 |         AnyValue::Categorical(idx, mapping, _) => Ok(mapping.get(idx).encode(env)),
    |                               ^^^  ^^^^^^^  ^ expected 2 fields, found 3
    |
   ::: ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/datatypes/any_value.rs:74:17
    |
74  |     Categorical(CatSize, &'a Arc<CategoricalMapping>),
    |                 -------  --------------------------- tuple variant has 2 fields

error[E0599]: no method named `downcast_iter` found for reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>` in the current scope
   --> src/encoding.rs:691:37
    |
691 |             $s.$convert_function()?.downcast_iter().map(|array| {
    |                                     ^^^^^^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`
...
846 |         DataType::Date => series_to_iovec!(resource, s, env, date, i32),
    |                           --------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `series_to_iovec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0061]: this method takes 2 arguments but 1 argument was supplied
   --> src/expressions.rs:819:22
    |
819 |     ExExpr::new(expr.arg_sort(opts))
    |                      ^^^^^^^^------
    |                              ||
    |                              |expected `bool`, found `SortOptions`
    |                              argument #2 of type `bool` is missing
    |
note: method defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.50.0/src/dsl/mod.rs:263:12
    |
263 |     pub fn arg_sort(self, descending: bool, nulls_last: bool) -> Self {
    |            ^^^^^^^^
help: provide the argument
    |
819 -     ExExpr::new(expr.arg_sort(opts))
819 +     ExExpr::new(expr.arg_sort(/* bool */, /* bool */))
    |

error[E0308]: mismatched types
  --> src/lazyframe/io.rs:24:14
   |
24 |         vec![all()]
   |              ^^^^^ expected `Expr`, found `Selector`
   |
help: try wrapping the expression in `polars::prelude::Expr::Selector`
   |
24 |         vec![polars::prelude::Expr::Selector(all())]
   |              ++++++++++++++++++++++++++++++++     +

error[E0308]: mismatched types
   --> src/lazyframe/io.rs:27:38
    |
27  |     let lf = LazyFrame::scan_parquet(filename, options)?.select(cols);
    |              ----------------------- ^^^^^^^^ expected `PlPath`, found `&str`
    |              |
    |              arguments to this function are incorrect
    |
note: associated function defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/scan/parquet.rs:164:12
    |
164 |     pub fn scan_parquet(path: PlPath, args: ScanArgsParquet) -> PolarsResult<Self> {
    |            ^^^^^^^^^^^^

error[E0277]: the trait bound `polars::prelude::PlPath: std::convert::From<std::path::PathBuf>` is not satisfied
  --> src/lazyframe/io.rs:97:51
   |
97 |             .sink_parquet(SinkTarget::Path(target.into()), options, None, sink_options)?
   |                                                   ^^^^ the trait `std::convert::From<std::path::PathBuf>` is not implemented for `polars::prelude::PlPath`
   |
   = note: required for `std::path::PathBuf` to implement `std::convert::Into<polars::prelude::PlPath>`

error[E0277]: the trait bound `polars::prelude::PlPath: std::convert::From<std::path::PathBuf>` is not satisfied
   --> src/lazyframe/io.rs:197:47
    |
197 |             .sink_ipc(SinkTarget::Path(target.into()), options, None, sink_options)?
    |                                               ^^^^ the trait `std::convert::From<std::path::PathBuf>` is not implemented for `polars::prelude::PlPath`
    |
    = note: required for `std::path::PathBuf` to implement `std::convert::Into<polars::prelude::PlPath>`

error[E0599]: no method named `fetch` found for struct `polars::prelude::LazyFrame` in the current scope
  --> src/lazyframe.rs:45:44
   |
45 |     Ok(ExDataFrame::new(data.clone_inner().fetch(n_rows)?))
   |                                            ^^^^^ method not found in `polars::prelude::LazyFrame`

error[E0277]: the trait bound `[polars::prelude::Selector; 1]: std::convert::AsRef<[polars::prelude::Expr]>` is not satisfied
    --> src/lazyframe.rs:120:41
     |
120  |     let lf = data.clone_inner().select(&[cols(columns)]);
     |                                 ------  ^^^^^^^^^^^^^^^ the trait `std::convert::AsRef<[polars::prelude::Expr]>` is not implemented for `[polars::prelude::Selector; 1]`
     |                                 |
     |                                 required by a bound introduced by this call
     |
     = help: the following other types implement trait `std::convert::AsRef<T>`:
               `&[<T as zerovec::ule::AsULE>::ULE]` implements `std::convert::AsRef<zerovec::zerovec::slice::ZeroSlice<T>>`
               `[T; N]` implements `std::convert::AsRef<[T]>`
               `[T]` implements `std::convert::AsRef<[T]>`
     = note: required for `&[polars::prelude::Selector; 1]` to implement `std::convert::AsRef<[polars::prelude::Expr]>`
note: required by a bound in `polars::prelude::LazyFrame::select`
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/frame/mod.rs:1198:22
     |
1198 |     pub fn select<E: AsRef<[Expr]>>(self, exprs: E) -> Self {
     |                      ^^^^^^^^^^^^^ required by this bound in `LazyFrame::select`

error[E0599]: no method named `exclude` found for enum `polars::prelude::Expr` in the current scope
   --> src/lazyframe.rs:126:51
    |
126 |     let lf = data.clone_inner().select(&[col("*").exclude(columns)]);
    |                                                   ^^^^^^^
    |
help: there is a method `explode` with a similar name, but with different arguments
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.50.0/src/dsl/mod.rs:203:5
    |
203 |     pub fn explode(self) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> src/lazyframe.rs:153:41
     |
153  |     let lf = data.clone_inner().explode(columns);
     |                                 ------- ^^^^^^^ expected `Selector`, found `Vec<&str>`
     |                                 |
     |                                 arguments to this method are incorrect
     |
     = note: expected enum `polars::prelude::Selector`
              found struct `std::vec::Vec<&str>`
note: method defined here
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/frame/mod.rs:1800:12
     |
1800 |     pub fn explode(self, columns: Selector) -> LazyFrame {
     |            ^^^^^^^

error[E0599]: no method named `exclude` found for enum `polars::prelude::Expr` in the current scope
   --> src/lazyframe.rs:260:28
    |
260 |         .select(&[col("*").exclude(["__explorer_literal_for_group__"])])
    |                            ^^^^^^^
    |
help: there is a method `explode` with a similar name, but with different arguments
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.50.0/src/dsl/mod.rs:203:5
    |
203 |     pub fn explode(self) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> src/lazyframe.rs:287:40
     |
287  |     Ok(ExLazyFrame::new(ldf.drop_nulls(columns)))
     |                             ---------- ^^^^^^^ expected `Option<Selector>`, found `Option<Vec<Expr>>`
     |                             |
     |                             arguments to this method are incorrect
     |
     = note: expected enum `std::option::Option<polars::prelude::Selector>`
                found enum `std::option::Option<std::vec::Vec<polars::prelude::Expr>>`
note: method defined here
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-lazy-0.50.0/src/frame/mod.rs:1886:12
     |
1886 |     pub fn drop_nulls(self, subset: Option<Selector>) -> LazyFrame {
     |            ^^^^^^^^^^

error[E0308]: mismatched types
   --> src/lazyframe.rs:300:16
    |
300 |         index: to_lazy_selectors(id_vars),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Selector`, found `Vec<Selector>`
    |
    = note: expected enum `polars::prelude::Selector`
             found struct `std::vec::Vec<polars::prelude::Selector>`

error[E0631]: type mismatch in function arguments
   --> src/lazyframe.rs:312:14
    |
312 |         .map(Selector::from)
    |          --- ^^^^^^^^^^^^^^
    |          |   |
    |          |   expected due to this
    |          |   found signature defined here
    |          required by a bound introduced by this call
    |
    = note: expected function signature `fn(std::string::String) -> _`
               found function signature `fn(polars::prelude::Selector) -> _`
note: required by a bound in `std::iter::Iterator::map`
   --> /rustc/be19eda0dc4c22c5cf5f1b48fd163acf9bd4b0a6/library/core/src/iter/traits/iterator.rs:772:5
help: consider wrapping the function in a closure
    |
312 |         .map(|arg0: std::string::String| Selector::from(/* polars::prelude::Selector */))
    |              +++++++++++++++++++++++++++               +++++++++++++++++++++++++++++++++

error[E0599]: the method `collect` exists for struct `Map<IntoIter<String>, fn(Selector) -> ... {<... as From<...>>::from}>`, but its trait bounds were not satisfied
   --> src/lazyframe.rs:313:10
    |
310 | /     values
311 | |         .into_iter()
312 | |         .map(Selector::from)
313 | |         .collect::<Vec<Selector>>()
    | |         -^^^^^^^ method cannot be called due to unsatisfied trait bounds
    | |_________|
    |
    |
    = note: the following trait bounds were not satisfied:
            `<fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from} as std::ops::FnOnce<(std::string::String,)>>::Output = _`
            which is required by `std::iter::Map<std::vec::IntoIter<std::string::String>, fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}>: std::iter::Iterator`
            `fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}: std::ops::FnMut<(std::string::String,)>`
            which is required by `std::iter::Map<std::vec::IntoIter<std::string::String>, fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}>: std::iter::Iterator`
            `std::iter::Map<std::vec::IntoIter<std::string::String>, fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}>: std::iter::Iterator`
            which is required by `&mut std::iter::Map<std::vec::IntoIter<std::string::String>, fn(polars::prelude::Selector) -> polars::prelude::Selector {<polars::prelude::Selector as std::convert::From<polars::prelude::Selector>>::from}>: std::iter::Iterator`

error[E0308]: mismatched types
   --> src/lazyframe.rs:400:29
    |
400 |           .how(JoinType::AsOf(AsOfOptions {
    |  ______________--------------_^
    | |              |
    | |              arguments to this enum variant are incorrect
401 | |             strategy,
402 | |             tolerance: None,
...   |
410 | |             check_sortedness: false,
411 | |         }))
    | |_________^ expected `Box<AsOfOptions>`, found `AsOfOptions`
    |
    = note: expected struct `std::boxed::Box<polars::prelude::AsOfOptions>`
               found struct `polars::prelude::AsOfOptions`
    = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
note: tuple variant defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.50.0/src/frame/join/args.rs:52:5
    |
52  |     AsOf(Box<AsOfOptions>),
    |     ^^^^
help: store this in the heap by calling `Box::new`
    |
400 ~         .how(JoinType::AsOf(Box::new(AsOfOptions {
401 |             strategy,
...
410 |             check_sortedness: false,
411 ~         })))
    |

error[E0433]: failed to resolve: use of undeclared type `CategoricalOrdering`
   --> src/series/from_list.rs:399:48
    |
399 |             .cast(&DataType::Categorical(None, CategoricalOrdering::default()))
    |                                                ^^^^^^^^^^^^^^^^^^^
    |                                                |
    |                                                use of undeclared type `CategoricalOrdering`
    |                                                help: a struct with a similar name exists: `CategoricalMapping`

error[E0599]: no method named `fill_null_with_values` found for reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>` in the current scope
   --> src/series.rs:590:10
    |
588 |       let s = series
    |  _____________-
589 | |         .date()?
590 | |         .fill_null_with_values(date.into())?
    | |         -^^^^^^^^^^^^^^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`
    | |_________|
    |
    |
help: one of the expressions' fields has a method of the same name
    |
590 |         .phys.fill_null_with_values(date.into())?
    |          +++++

error[E0599]: no method named `quantile` found for reference `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>` in the current scope
    --> src/series.rs:1101:43
     |
1101 |         DataType::Date => match s.date()?.quantile(quantile, strategy)? {
     |                                           ^^^^^^^^ method not found in `&polars::prelude::Logical<polars::prelude::DateType, polars::prelude::Int32Type>`
     |
help: one of the expressions' fields has a method of the same name
     |
1101 |         DataType::Date => match s.date()?.phys.quantile(quantile, strategy)? {
     |                                           +++++

error[E0308]: `?` operator has incompatible types
    --> src/series.rs:1141:45
     |
1141 |         DataType::Decimal(_, _) => peak_max(s.decimal()?),
     |                                             ^^^^^^^^^^^^ expected `&ChunkedArray<_>`, found `&Logical<DecimalType, Int128Type>`
     |
     = note: `?` operator cannot convert from `&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>` to `&polars::prelude::ChunkedArray<_>`
     = note: expected reference `&polars::prelude::ChunkedArray<_>`
                found reference `&polars::prelude::Logical<polars::prelude::DecimalType, polars::prelude::Int128Type>`

error[E0599]: no function or associated item named `from_cats_and_rev_map_unchecked` found for struct `polars::prelude::Logical` in the current scope
    --> src/series.rs:1255:37
     |
1255 |                 CategoricalChunked::from_cats_and_rev_map_unchecked(
     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `polars::prelude::Logical<_, _>`
     |
note: if you're trying to build a new `polars::prelude::Logical<_, _>` consider using one of the following associated functions:
      polars::prelude::categorical::<impl polars::prelude::Logical<T, <T as polars::prelude::PolarsCategoricalType>::PolarsPhysical>>::full_null_with_dtype
      polars::prelude::categorical::<impl polars::prelude::Logical<T, <T as polars::prelude::PolarsCategoricalType>::PolarsPhysical>>::from_cats_and_dtype
      polars::prelude::categorical::<impl polars::prelude::Logical<T, <T as polars::prelude::PolarsCategoricalType>::PolarsPhysical>>::from_cats_and_dtype_unchecked
      polars::prelude::categorical::<impl polars::prelude::Logical<T, <T as polars::prelude::PolarsCategoricalType>::PolarsPhysical>>::from_str_iter
      and 9 others
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/categorical.rs:62:5
     |
62   |       pub fn full_null_with_dtype(name: PlSmallStr, length: usize, dtype: DataType) -> Self {
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
71   | /     pub fn from_cats_and_dtype(
72   | |         mut cat_ids: ChunkedArray<T::PolarsPhysical>,
73   | |         dtype: DataType,
74   | |     ) -> Self {
     | |_____________^
...
117  | /     pub unsafe fn from_cats_and_dtype_unchecked(
118  | |         cat_ids: ChunkedArray<T::PolarsPhysical>,
119  | |         dtype: DataType,
120  | |     ) -> Self {
     | |_____________^
...
149  | /     pub fn from_str_iter<'a, I: IntoIterator<Item = Option<&'a str>>>(
150  | |         name: PlSmallStr,
151  | |         dtype: DataType,
152  | |         strings: I,
153  | |     ) -> PolarsResult<Self> {
     | |___________________________^
help: there is an associated function `from_cats_and_dtype_unchecked` with a similar name
    --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/polars-core-0.50.0/src/chunked_array/logical/categorical.rs:117:5
     |
117  | /     pub unsafe fn from_cats_and_dtype_unchecked(
118  | |         cat_ids: ChunkedArray<T::PolarsPhysical>,
119  | |         dtype: DataType,
120  | |     ) -> Self {
     | |_____________^

This is beyond my ability in rust to investigate and fix all of these on my own, but these categorical bugs have been bugging me a lot, and I'm willing to contribute if there's anything I can do to to help.

skyqrose avatar Dec 18 '25 15:12 skyqrose

@skyqrose @thbar Apologies for the delayed responses! I've been working on some other life stuff and have fallen behind Explorer.

As you say, an upgrade to Polars 0.50 is quite involved. I tried an upgrade a little while back but my progress stalled when I realized that they'd completely redone their Category implementation. A decent portion of the Rust code will need to be rewritten to accommodate.

That said, @skyqrose if you want to push up your attempt I'll be happy to take a look.

billylanchantin avatar Dec 18 '25 16:12 billylanchantin

I didn't make any progress. I just got far enough to see the compiler errors but didn't fix any of them.

skyqrose avatar Dec 18 '25 19:12 skyqrose