News for hackers. Stuff that matters.
Re:Let's Talk about Joins by frogamel on Saturday January 20, 2024 @10:59PM (#39075396)
Dplyr actually supports some really cool join functionalities that I wish were in SQL implementations, including:

- Ability to specify whether your join should be one-to-one, many-to-one, etc. So that R will throw an error instead of quietly returning 100x as many rows as expected (which I've seen a lot in SQL pipelines).

- A direct anti_join function. Much cleaner than using LEFT JOIN... WHERE b IS NULL to replicate an anti join.

- Support for rolling joins. E.g. for each user, get the price of their last transaction. Super common but can be a pain in SQL since it requires nested subqueries or CTEs.

Re:Let's Talk about Joins by sa-code on Sunday January 21, 2024 @03:21AM (#39076643)
Polars does this too!