Comments (14)
In case it's helpful, I can reproduce this, also for the release 0.41.1 with rustc 1.77 in a clean project:
~/src $ cargo new try_polars_041
Created binary (application) `try_polars_041` package
~/src $ cd try_polars_041
master ~/src/try_polars_041 $ cargo add polars
Updating crates.io index
Adding polars v0.41.1 to dependencies.
...
Updating crates.io index
master ~/src/try_polars_041 $ cargo build
...
error[E0277]: the trait bound `for<'a> <_ as polars_core::datatypes::PolarsDataType>::Physical<'a>: ToTotalOrd` is not satisfied
--> /home/mgarcia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-ops-0.41.1/src/frame/join/hash_join/single_keys_dispatch.rs:220:25
|
220 | group_join_inner(&lhs, &rhs, validate, join_nulls)
| ^^^^^^^^^^^^^^^^ the trait `for<'a> ToTotalOrd` is not implemented for `<_ as polars_core::datatypes::PolarsDataType>::Physical<'a>`
|
= help: the following other types implement trait `ToTotalOrd`:
bool
char
isize
i8
i16
i32
i64
i128
and 14 others
note: this is a known limitation of the trait solver that will be lifted in the future
--> /home/mgarcia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-ops-0.41.1/src/frame/join/hash_join/single_keys_dispatch.rs:220:25
|
220 | group_join_inner(&lhs, &rhs, validate, join_nulls)
| ^^^^^^^^^^^^^^^^ try adding turbofish arguments to this expression to specify the types manually, even if it's redundant
note: required by a bound in `group_join_inner`
--> /home/mgarcia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-ops-0.41.1/src/frame/join/hash_join/single_keys_dispatch.rs:322:73
|
312 | fn group_join_inner<T>(
| ---------------- required by a bound in this function
...
322 | Send + Sync + Copy + TotalHash + TotalEq + DirtyHash + IsNull + ToTotalOrd,
| ^^^^^^^^^^ required by this bound in `group_join_inner`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `polars-ops` (lib) due to 16 previous errors
warning: build failed, waiting for other jobs to finish...
from polars.
I cannot reproduce this? What is you rustc version?
from polars.
% rustc --version
rustc 1.77.0-nightly (595bc6f00 2024-01-05)
too old?
from polars.
Nah, might be some issues. Will need a bit of work. Hope to patch in a few days.
from polars.
Ok...
Thanks!
With last rustc version I've just tried
% rustc --version
rustc 1.81.0-nightly (3cb521a43 2024-06-22)
I now get:
help: consider importing this struct
|
1 + use polars_io::cloud::CloudOptions;
Same error as #17138
from polars.
Can you now check on main
? I can compile that with rustc 1.78
from polars.
I could compile main
yesterday already. For some reason it seemed like it was only failing when having Polars as a dependency. Or maybe 0.41
was broken but main
was already fixed. I can try to add the main
of Polars as a dependency if that's useful.
from polars.
Adding Polars main
as a dependency seems to still fail. No idea why building the library works, but using it as a dependency doesn't. But let me know if I can help with anything else.
~/src $ cargo new polars_main
Created binary (application) `polars_main` package
~/src $ cd polars_main
~/src/polars_main $ cargo add --git https://github.com/pola-rs/polars.git polars
Updating git repository `https://github.com/pola-rs/polars.git`
Adding polars (git) to dependencies.
Features:
+ csv
...
Updating git repository `https://github.com/pola-rs/polars.git`
Updating crates.io index
master ~/src/polars_main $ cargo run
Downloaded strum v0.26.3
Downloaded uuid v1.9.0
Downloaded syn v2.0.68
Downloaded 3 crates (319.7 KB) in 0.18s
Compiling version_check v0.9.4
Compiling proc-macro2 v1.0.86
...
error[E0277]: the trait bound `for<'a> <_ as polars_core::datatypes::PolarsDataType>::Physical<'a>: ToTotalOrd` is not satisfied
--> /home/mgarcia/.cargo/git/checkouts/polars-b0d90607192fd414/cc7fc32/crates/polars-ops/src/frame/join/hash_join/single_keys_dispatch.rs:220:25
|
220 | group_join_inner(&lhs, &rhs, validate, join_nulls)
| ^^^^^^^^^^^^^^^^ the trait `for<'a> ToTotalOrd` is not implemented for `<_ as polars_core::datatypes::PolarsDataType>::Physical<'a>`
|
= help: the following other types implement trait `ToTotalOrd`:
bool
char
isize
i8
i16
i32
i64
i128
and 14 others
note: this is a known limitation of the trait solver that will be lifted in the future
--> /home/mgarcia/.cargo/git/checkouts/polars-b0d90607192fd414/cc7fc32/crates/polars-ops/src/frame/join/hash_join/single_keys_dispatch.rs:220:25
|
220 | group_join_inner(&lhs, &rhs, validate, join_nulls)
| ^^^^^^^^^^^^^^^^ try adding turbofish arguments to this expression to specify the types manually, even if it's redundant
note: required by a bound in `group_join_inner`
--> /home/mgarcia/.cargo/git/checkouts/polars-b0d90607192fd414/cc7fc32/crates/polars-ops/src/frame/join/hash_join/single_keys_dispatch.rs:322:73
|
312 | fn group_join_inner<T>(
| ---------------- required by a bound in this function
...
322 | Send + Sync + Copy + TotalHash + TotalEq + DirtyHash + IsNull + ToTotalOrd,
| ^^^^^^^^^^ required by this bound in `group_join_inner`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `polars-ops` (lib) due to 16 previous errors
warning: build failed, waiting for other jobs to finish...
from polars.
Hi,
I still have the same error with rustc 1.77.0 both on main branch and release 0.41.1?
# polars = {git = "https://github.com/pola-rs/polars/", features = ["lazy"]}
cargo +1.77.0 build --release
# polars = {version = "0.41.1", features = ["lazy"]}
cargo +1.77.0 build --release
from polars.
Seems like a rustc < 1.78 issue. Will add an explicit turbofish and otherwise, update rustc? 🤷
from polars.
Thanks,
I've just installed 1.78 after 1.77 this morning.
Indeed, I run:
# polars = {git = "https://github.com/pola-rs/polars/", features = ["lazy"]}
cargo +1.78.0 build --release
and no error.
1.77 nok, 1.78 ok.
Will test after with your turbofish fix on 1.77.
from polars.
Doing the same as above works fine with rustc 1.81. I guess all good with a newer compiler :)
from polars.
Many thanks for the time spent.
from polars.
It's well fixed with turbo fish on 1.77.
from polars.
Related Issues (20)
- Unclear whether one should use `.describe(_optimized)_plan()` or `.explain()`
- Unable to read CSV when setting schema with a fixed tz offset
- Read Parquet Fails on ADLS for File in Subdirectory of Different Container HOT 3
- Left join large memory usage regression HOT 1
- `df.with_columns(pl.col('struct_col').shift(-1).over('group_col')` raises an error HOT 1
- Add null_values to read_json()
- Add example of `df.join(df2, how='cross')`
- [python] Support `db_kwargs` and `conn_kwargs` for ADBC connection HOT 1
- LazyFrame `collect` method, does not work when using GPU HOT 3
- str.to_titlecase() add option for capital after hyphen
- Trying to package Polars for NixOS results in an error E0599 HOT 3
- Nullability of `Struct` series HOT 1
- Unimplemented join on list[i64] succeeds with empty dataframe in lazy mode
- More informative error messages for unsupported options in streaming mode
- Getting a "ComputeError: cannot evaluate two Series of different lengths" with straight forward Lazy expressions. HOT 1
- release new Rust Polars version on crates.io?
- Support for handling duplicate timestamps in rolling operations similar to Pandas HOT 2
- Pandas.Timestamp timezone and unit gets modified when creating new Polars Dataframe HOT 1
- read_csv trimming white space on first line when file has no headers and is single column HOT 2
- Pandas DataFrames with a multiindex fails to be converted to a Polars DataFrame
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polars.