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: Allow join_nulls in asof join #21172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NicolasMuellerQC
Copy link

@NicolasMuellerQC NicolasMuellerQC commented Feb 10, 2025

Fixes #17886: This PR introduces a join_nulls option to the by part of join_asof.

@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 10, 2025
Comment on lines +296 to +303
let left_by_bin = left_by_s.strict_cast(&DataType::Binary)?;
let right_by_bin = right_by_s.strict_cast(&DataType::Binary)?;

let left_by = left_by_bin.binary().unwrap();
let right_by = right_by_bin.binary().unwrap();
asof_join_by_binary::<BinaryType, T, A, F>(
left_by, right_by, left_asof, right_asof, filter, allow_eq, join_nulls,
)
Copy link
Author

Choose a reason for hiding this comment

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

Is there a better way to use asof_join_by_binary with numerical types?
Or even better, is it easily possible to adjust asof_join_by_numeric to work with nulls in the by column?

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 80.76923% with 10 lines in your changes missing coverage. Please review.

Project coverage is 79.89%. Comparing base (d15bfe5) to head (0a97578).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-ops/src/frame/join/asof/groups.rs 79.59% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21172      +/-   ##
==========================================
+ Coverage   79.88%   79.89%   +0.01%     
==========================================
  Files        1593     1593              
  Lines      227640   227671      +31     
  Branches     2600     2600              
==========================================
+ Hits       181856   181906      +50     
+ Misses      45187    45168      -19     
  Partials      597      597              

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

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
Development

Successfully merging this pull request may close these issues.

join_nulls in "asof" join
1 participant