Skip to content

Commit b3b013f

Browse files
Merge branch 'master' into typos-call-info
2 parents c2ba0a2 + a014e38 commit b3b013f

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ See [#2611](https://github.com/Rdatatable/data.table/issues/2611) for details. T
348348

349349
24. Rolling functions now ensure there is no nested parallelism. It could have happened for vectorized input and `adaptive=TRUE`, [#7352](https://github.com/Rdatatable/data.table/issues/7352). Thanks @jangorecki for the fix.
350350

351+
25. By-group operations on missing rows (e.g. `foo[c(i, NA), bar, by=grp]`) now avoid leaving in data from the previous groups, [#7442](https://github.com/Rdatatable/data.table/issues/7442). Thanks @aitap for the report and the fix.
352+
351353
### NOTES
352354

353355
1. The following in-progress deprecations have proceeded:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ A list of packages that significantly support, extend, or make use of `data.tabl
108108

109109
- click the **Watch** button at the top and right of GitHub project page
110110
- read [NEWS file](https://github.com/Rdatatable/data.table/blob/master/NEWS.md)
111-
- follow [#rdatatable](https://twitter.com/hashtag/rdatatable) and the [r_data_table](https://x.com/r_data_table) account on X/Twitter
111+
- follow [#rdatatable](https://x.com/hashtag/rdatatable) and the [r_data_table](https://x.com/r_data_table) account on X/Twitter
112112
- follow [#rdatatable](https://fosstodon.org/tags/rdatatable) and the [r_data_table account](https://fosstodon.org/@r_data_table) on fosstodon
113113
- follow the [data.table community page](https://www.linkedin.com/company/data-table-community) on LinkedIn
114114
- watch recent [Presentations](https://github.com/Rdatatable/data.table/wiki/Presentations)

inst/tests/tests.Rraw

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21867,7 +21867,12 @@ text = paste0(
2186721867
)
2186821868
test(2346, data.table::fread(text = text), data.table(mary = rep("mary", 99), had = "had", a = "a", little = "little", lamb = "lamb"), warning = "First discarded non-empty line")
2186921869

21870+
# With 'i' containing NA and no GForce, columns for missing groups weren't fully missing, #7442
21871+
DT = data.table(a="a", grp=1L)
21872+
i = c(1, 1, 1, NA, NA)
21873+
test(2347, DT[i, .(result = all(is.na(grp) == is.na(a))), by = grp][,all(result)], options = list(datatable.optimize = 0))
21874+
2187021875
# .checkTypos internal implementation not exposed for non-typo bug, #7444
2187121876
DT = data.table(a = as.Date("2010-01-01"), b = 1L)
21872-
test(2347.1, tryCatch(DT[a == as.Date("20100101")], error=conditionCall)[[1L]], quote(charToDate))
21873-
test(2347.2, tryCatch(DT[a == as.Date("20100101") | b == 2L], error=conditionCall)[[1L]], quote(charToDate))
21877+
test(2348.1, tryCatch(DT[a == as.Date("20100101")], error=conditionCall)[[1L]], quote(charToDate))
21878+
test(2348.2, tryCatch(DT[a == as.Date("20100101") | b == 2L], error=conditionCall)[[1L]], quote(charToDate))

src/dogroups.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ SEXP dogroups(SEXP dt, SEXP dtcols, SEXP groups, SEXP grpcols, SEXP jiscols, SEX
217217
}
218218
if (istarts[i] == NA_INTEGER || (LENGTH(order) && iorder[ istarts[i]-1 ]==NA_INTEGER)) {
219219
for (int j=0; j<length(SDall); ++j) {
220+
SETLENGTH(VECTOR_ELT(SDall, j), 1);
220221
writeNA(VECTOR_ELT(SDall, j), 0, 1, false);
221222
// writeNA uses SET_ for STR and VEC, and we always use SET_ to assign to SDall always too. Otherwise,
222223
// this writeNA could decrement the reference for the old value which wasn't incremented in the first place.

0 commit comments

Comments
 (0)