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

Weird behaviour when joining #6799

Open
iagogv3 opened this issue Feb 7, 2025 · 4 comments
Open

Weird behaviour when joining #6799

iagogv3 opened this issue Feb 7, 2025 · 4 comments

Comments

@iagogv3
Copy link
Contributor

iagogv3 commented Feb 7, 2025

Reading the new join vignettes I found

- The date related `ProductReceivedProd2` was omitted from this new table.
```{r}
ProductReceivedProd2[ProductSalesProd2,
on = list(product_id, date < date)]
```

which I did not understood initially the full consequences of this, but later, working with my own data, I realised it means losing data from x (if doing x[y, on = .(xid = yid, date < ydate),...]).

I may use something like x[y, on = .(xid = yid), j = .(date = x.date), ...], but then I have to specify inside j = .(...) all the columns from x and y (which may be a lot). I have tried including .SD, x.SD, x..SD, i.SD, i..SD in distinct ways, but nothing of this works.

Is there an abbreviated way to include all x and y (i) columns in the join, while using j to specify some names or some concrete data columns?

@tdhock
Copy link
Member

tdhock commented Feb 10, 2025

related to #4949

@tdhock
Copy link
Member

tdhock commented Feb 10, 2025

probably fixed by #3093 (please look at that PR, it needs help)

@iagogv3
Copy link
Contributor Author

iagogv3 commented Feb 13, 2025

@tdhock Thanks for pointing me to the original issue and to the PR (I looked at it, but it is too much complex for the time I have now)

@tdhock
Copy link
Member

tdhock commented Feb 13, 2025

me too

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

No branches or pull requests

2 participants