Skip to content

Commit

Permalink
unit test for already resolved #3103
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed Nov 26, 2019
1 parent 6f17d18 commit fe1e346
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

## BUG FIXES

1. grouping and aggregating by same column could sometimes raise error, [#3103](https://github.com/Rdatatable/data.table/issues/3103). Thanks to @cbailiss for reporting.

## NOTES

1. Links in the manual were creating warnings when installing HTML, [#4000](https://github.com/Rdatatable/data.table/issues/4000). Thanks to Morgan Jacob.
Expand Down
4 changes: 4 additions & 0 deletions inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -16381,6 +16381,10 @@ test(2121.5, DT[, .(.N=.N), by=a], data.table(a=c(1,2), .N=2:1)) # user supplied
## { ending in NULL should retain that NULL, #4061
test(2121.6, DT[ , {.(a, b=b+1); NULL}], NULL)

# aggregating and grouping by same column #3103
dt = data.table(SomeNumberA=c(1,1,1),SomeNumberB=c(1,1,1))
test(2122.1, dt[, .(.N, TotalA=sum(SomeNumberA), TotalB=sum(SomeNumberB)), by=SomeNumberA], data.table(SomeNumberA=1, N=3L, TotalA=1, TotalB=3))


###################################
# Add new tests above this line #
Expand Down

0 comments on commit fe1e346

Please sign in to comment.