-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(python, rust): clearer message when stringcache-related errors occur #9715
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks a lot!
One remark. I think we can store this message in polars-error
under a shortcut (there are more).
@@ -95,8 +95,22 @@ pub fn _check_categorical_src(l: &DataType, r: &DataType) -> PolarsResult<()> { | |||
if let (DataType::Categorical(Some(l)), DataType::Categorical(Some(r))) = (l, r) { | |||
polars_ensure!( | |||
l.same_src(r), | |||
ComputeError: "joins/or comparisons on categoricals can only happen if they were \ | |||
created under the same global string cache" | |||
ComputeError: r#" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we deduplicate this message? Maybe add it in polars-error
?
related to #9106 (debatable whether it closes it)
Demo:
latest release
here