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

feat: Implement join on struct dtype #21093

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lukemanley
Copy link
Contributor

Join on Struct dtype via row encoding.

closes #15500
closes #10721

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Feb 5, 2025
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.28%. Comparing base (036ee1e) to head (b27663a).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21093      +/-   ##
==========================================
+ Coverage   79.20%   79.28%   +0.08%     
==========================================
  Files        1589     1589              
  Lines      226488   226527      +39     
  Branches     2594     2594              
==========================================
+ Hits       179399   179613     +214     
+ Misses      46493    46318     -175     
  Partials      596      596              

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

@coastalwhite
Copy link
Collaborator

Nice, I think we can use no_order=true for the row encoding. That allows a few optimizations that are not allowed normally.

@lukemanley
Copy link
Contributor Author

Nice, I think we can use no_order=true for the row encoding. That allows a few optimizations that are not allowed normally.

Thanks. Let me know if this is what you had in mind.

Also, the how="full" join is failing for new_streaming. It seems to be failing this check:

assert_eq!(col.len(), height);

It looks like col is a scalar column in this case. Any suggestions on that?

@ritchie46
Copy link
Member

Also, the how="full" join is failing for new_streaming. It seems to be failing this check:

Hmm, I think we should take a look at the backtrace for that one. It might be a bug.

@lukemanley
Copy link
Contributor Author

Hmm, I think we should take a look at the backtrace for that one. It might be a bug.

I'm a bit stuck on this one. The following succeeds about 50% of the time and fails the other 50%:

lhs = pl.LazyFrame(
    {
        "a": [{"x": 1}, {"x": 2}],
        "b": [1, 2],
    }
)
rhs = pl.LazyFrame(
    {
        "a": [{"x": 1}],
        "c": [1],
    }
)
lhs.join(rhs, on=["a"], how="inner").collect(new_streaming=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
3 participants