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

CJ now auto-names its input #2977

Merged
merged 7 commits into from Sep 1, 2018
Merged

CJ now auto-names its input #2977

merged 7 commits into from Sep 1, 2018

Conversation

MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Jul 17, 2018

Closes #1596,
Closes #2192
Related #2081

  • technically a breaking change since I'm sure there's code out there relying on CJ(a, b) being named V1,V2 (there was in our own testing, after all).
  • no new tests since this breaks a few old tests, I think the behavior is covered by these existing tests.
  • minor unrelated change: if (n < 1L) return( null.data.table() ) moved earlier

Hope is that this name_dots function can be used for fixing this weird autonaming issue as well (but that fix is a bit messier):

data.table(a = 1:5, b = 6:10)[ , if (.BY$a > 2) .(b), by = a]
# vs
data.table(a = 1:5, b = 6:10)[ , .(b), by = a]

@jangorecki
Copy link
Member

I would postpone this to 1.12

@mattdowle mattdowle added this to the 1.12.0 milestone Aug 31, 2018
@codecov
Copy link

codecov bot commented Aug 31, 2018

Codecov Report

Merging #2977 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2977      +/-   ##
==========================================
+ Coverage   90.82%   90.84%   +0.01%     
==========================================
  Files          61       61              
  Lines       11736    11738       +2     
==========================================
+ Hits        10659    10663       +4     
+ Misses       1077     1075       -2
Impacted Files Coverage Δ
R/setkey.R 83.11% <100%> (-0.08%) ⬇️
R/utils.R 87.09% <100%> (+10.62%) ⬆️
R/data.table.R 91.66% <100%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 040f534...8583e5b. Read the comment docs.

@mattdowle
Copy link
Member

mattdowle commented Aug 31, 2018

It could be put in now with an option to turn on new behaviour (default off for now). We're getting used to this option shenanigans now, so it's not really much more effort. Then change default to on in 1.12.0 and the 0.5% of folk that break on 1.12.0 can revert until they update. "Do no harm", right?

@mattdowle mattdowle modified the milestones: 1.12.0, 1.11.6 Aug 31, 2018
@mattdowle mattdowle changed the title Closes #1596 -- CJ now auto-names its input CJ now auto-names its input Sep 1, 2018
@MichaelChirico
Copy link
Member Author

thanks for following up, haven't found time to sit down for this these few weeks +1

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.

CJ(sorted = TRUE) document wording FR: assign names to CJ() like data.table() does
3 participants