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: Raise exception for illegal explode usage #19115

Closed

Conversation

barak1412
Copy link
Contributor

Fixes #19049.

I am not sure if it's the right fix, since I think it is better to be caught earlier.

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

codecov bot commented Oct 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.80%. Comparing base (f7de80c) to head (a32d256).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #19115   +/-   ##
=======================================
  Coverage   79.80%   79.80%           
=======================================
  Files        1531     1531           
  Lines      208563   208565    +2     
  Branches     2913     2913           
=======================================
+ Hits       166437   166448   +11     
+ Misses      41575    41566    -9     
  Partials      551      551           

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

@ritchie46
Copy link
Member

explode on non nested types is allowed and is considered a no-op.

@barak1412
Copy link
Contributor Author

@ritchie46 So the the opened issue is not a bug?
Or it should error only when used in the context of list/array namespace.

@ritchie46
Copy link
Member

The arr.explode now goes into the DSL as explode, but should go into a unique Arrray::Explode node in the DSL.

When converting to IR, we can then check if the .arr was actually called on an array type.

@barak1412
Copy link
Contributor Author

Thanks, I will try to learn this part of the code, and do the fix.
I guess also List::Explode should be added and verified as well.

@barak1412 barak1412 closed this Oct 7, 2024
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.

.arr.explode() fails to raise error for non-Array inputs
2 participants