polars icon indicating copy to clipboard operation
polars copied to clipboard

Support right (outer) joins in pl.LazyFrame

Open OneRaynyDay opened this issue 2 years ago • 0 comments

Right joins

Currently, pl.LazyFrame supports the following types of joins:

“inner” “left” “outer” “asof”, “cross” “semi” “anti”

One type of join that is missing from here is a right join. Of course, one could just join the two lazyframes in the other order:

lf1.join(lf2, how="right", ...) == lf2.join(lf1, how="left", ...)

but often times this expression is chained in a long lazy transformation which makes the above^ substitution harder to perform. I took a look at the join implementation and it seems relatively simple to swap lf1, lf2 within based on how. Let me know if I'm missing anything, thanks!

OneRaynyDay avatar Jul 07 '22 23:07 OneRaynyDay