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 incorrect lazy schema for explode on array columns #19776

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Nov 14, 2024

Fixes #19763

Our lazy schema for an exploded array column was not correct. I think this was only starting causing issues with joins after #19625 because we never used this schema information before then

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Nov 14, 2024
@@ -132,7 +132,7 @@ impl From<ArrayFunction> for SpecialEq<Arc<dyn ColumnsUdf>> {
#[cfg(feature = "array_count")]
CountMatches => map_as_slice!(count_matches),
Shift => map_as_slice!(shift),
Explode => unreachable!(),
Explode => map_as_slice!(explode),
Copy link
Collaborator Author

@nameexhaustion nameexhaustion Nov 14, 2024

Choose a reason for hiding this comment

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

I've also removed some code further down that re-wrote ArrayFunction::Explode to AExpr::Explode - it was being done in the optimizer stage which isn't guaranteed to be hit.

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.55%. Comparing base (420c0d9) to head (a5f53e1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #19776   +/-   ##
=======================================
  Coverage   79.55%   79.55%           
=======================================
  Files        1544     1544           
  Lines      213240   213241    +1     
  Branches     2441     2441           
=======================================
+ Hits       169645   169654    +9     
+ Misses      43046    43038    -8     
  Partials      549      549           

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

@ritchie46 ritchie46 merged commit b7fce25 into pola-rs:main Nov 14, 2024
26 checks passed
@nameexhaustion nameexhaustion deleted the array-explode-schema branch November 18, 2024 08:20
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.

join fails because of an uninstructed cast from int to array[int, x] on 1.14.0
2 participants