-
Notifications
You must be signed in to change notification settings - Fork 986
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
non-equi join masks column names from x and i in the j expression #2595
Comments
may be related to #2569 |
To me this is very much related to the general weird behaviour of non-equi joins. The column that is joined on looks very weird after the join. Just doing:
yields
Here you see, that grouping by iRows (which is essentially, what by = .EACHi does) is naturally giving the unexpected result that you saw.
MAybe @mattdowle or @arunsrinivasan can comment on this. |
@MarkusBonsch this behaviour is discussed in #1615. We can eventually force users to use |
@ethanbsmith I am closing this issue because the "bug" can be explained by known data.table behaviour. If you disagree, don't hesitate to reopen. |
this issue just bit me again and cost me hours to track down. I think this is a real bug that should be addressed, but I will defer to the owners. just my $.02 below:
|
simpler example highlighting the masking problem:
|
@ethanbsmith ad.2 please read why this behaviour was "chosen" in #1615, ad.4 I agree, ad.5 read comments there too, prefixes are required as of now, they are just not enforced on user while they probably should be. Please discuss this behaviour in single issue, best the place where it was already discussed. You can also include some minimal test cases there so we can include them when closing #1615. Easiest way seems to be warning on lack of prefixes when column names mismatch occurs. |
This was very hard to track down. If prefixes are indeed required in this scenario, maybe a warning or error could be issued
might be related to #2313, #1761
This version produces incorrect values for
fmean
andfmax
This version, with the prefix works as expected:
The text was updated successfully, but these errors were encountered: