Skip to content

Conversation

@0x009922
Copy link
Contributor

I have added some changes on top of #1080:

  • Refined docs (mostly copied from Polars Python API);
  • Validating :on to be a single column (join_asof currently works only with a single column)
  • Chore refactors (restore Cargo.toml; reduce boilerplate of :on/:by normalisation).

Maybe as part of this PR, or as a separate one, would be nice to add other options supported by Polars:

  • :tolerance
  • :allow_eq
  • :check_sortedness

Copy link
Member

@billylanchantin billylanchantin left a comment

Choose a reason for hiding this comment

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

Thanks, this looks great! It's also been in my queue for quite a while, so I appreciate you getting it across the finish line.

Maybe as part of this PR, or as a separate one, would be nice to add other options supported by Polars:

I leave that up to you. I'd be happy to merge this essentially as is, then you can add the additional options as a follow-on if you like.

My only quibble is that I find the explanation of by a bit lacking. (The Polars docs are the real culprit here.) I had to do a few tests in console of that option before I understood the intended behavior.

@0x009922
Copy link
Contributor Author

0x009922 commented Sep 16, 2025

Thank you for the review!

I leave that up to you. I'd be happy to merge this essentially as is, then you can add the additional options as a follow-on if you like.

I think adding them as a follow-on is easier for everyone.

My only quibble is that I find the explanation of by a bit lacking. (The Polars docs are the real culprit here.) I had to do a few tests in console of that option before I understood the intended behavior.

I would agree... Perhaps, I could add a few more tests showing in more depth how by works (and figure it out myself).

Co-authored-by: Billy Lanchantin <[email protected]>
Copy link
Member

@billylanchantin billylanchantin left a comment

Choose a reason for hiding this comment

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

I went a little overboard and attempted a rewrite of the Examples section.

After rereading, I found the examples that Polars chose a little confusing. I think my brain just doesn't parse the dates fast enough to follow super easily.

My intended audience is someone who knows what a left join is but hasn't encountered the "asof" join before. LMK if you think this is better. I'm also happy to go with something else!

Co-authored-by: Billy Lanchantin <[email protected]>
@0x009922
Copy link
Contributor Author

It seems there is nothing left to add to this PR. Or would you like me to change something else?

@billylanchantin
Copy link
Member

No this is awesome, thanks again! ❤️

@billylanchantin billylanchantin merged commit 188050e into elixir-explorer:main Sep 20, 2025
4 checks passed
@jeregrine
Copy link
Contributor

❤️💜

@billylanchantin
Copy link
Member

Yeah thanks to @jeregrine as well for getting this started! The "asof" join has been useful to me on a number of occasions and I'm really glad we can incorporate it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants