Skip to content
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

fix: Fix lit().shrink_dtype() broadcasting #18958

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

nameexhaustion
Copy link
Collaborator

Fixes #18755

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Sep 27, 2024
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.94%. Comparing base (71a8b05) to head (15d263b).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18958      +/-   ##
==========================================
+ Coverage   79.88%   79.94%   +0.06%     
==========================================
  Files        1522     1523       +1     
  Lines      206958   208002    +1044     
  Branches     2906     2906              
==========================================
+ Hits       165322   166290     +968     
- Misses      41088    41164      +76     
  Partials      548      548              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nameexhaustion nameexhaustion marked this pull request as ready for review September 27, 2024 07:45
@nameexhaustion nameexhaustion deleted the lit-fn-scalar branch September 27, 2024 08:08
@nameexhaustion nameexhaustion restored the lit-fn-scalar branch September 27, 2024 10:01
@nameexhaustion
Copy link
Collaborator Author

Oops 👀

@@ -8,7 +8,7 @@ pub fn is_scalar_ae(node: Node, expr_arena: &Arena<AExpr>) -> bool {
AExpr::Literal(lv) => lv.is_scalar(),
AExpr::Function { options, input, .. }
| AExpr::AnonymousFunction { options, input, .. } => {
if options.is_elementwise() {
if options.is_elementwise() || !options.flags.contains(FunctionFlags::CHANGES_LENGTH) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah.. I feel we need a better flag for this. Now it seems duplicate and tricky. Anyhow. Good fix for now. 👍

@ritchie46 ritchie46 merged commit 3342cc2 into pola-rs:main Sep 27, 2024
51 of 52 checks passed
@nameexhaustion nameexhaustion deleted the lit-fn-scalar branch October 29, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expr.shrink_dtype() breaks broadcasting
2 participants