prohibit duplicate key columns#7760
Conversation
|
Generated via commit 7253f69 Download link for the artifact containing the test results: ↓ atime-results.zip
|
|
Gemini identified some remaining ways for ambiguity to creep in: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7760 +/- ##
=======================================
Coverage 99.04% 99.04%
=======================================
Files 87 87
Lines 17064 17087 +23
=======================================
+ Hits 16901 16924 +23
Misses 163 163 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I've added these cases, but I'm sure we will encounter special versions of these again |
|
Yep, sharing because those look pretty easy to encounter in practice. Remaining ones will be more baroque. A fresh session finds nothing, so I think this is good now. |
| id1 = sample(letters, 10) # reduced from 20 to 10 | ||
| id2 = id1 | ||
| date = 1:10 # and 40 to 10 to save ram, #5517 | ||
| dt = setkey(data.table(CJ(date, id1, id2)), NULL) |
There was a problem hiding this comment.
test is somewhat confusing, is CJ(..., sorted=FALSE) not enough?
| if (verbose) {cat(timetaken(last.started.at),"\n"); flush.console()} | ||
| } else if (.by_result_is_keyable(x, keyby, bysameorder, byjoin, allbyvars, bysub)) { | ||
| setattr(ans, "sorted", names(ans)[seq_along(grpcols)]) | ||
| if (!any(names(ans)[seq_along(grpcols)] %chin% duplicated_values(names(ans)))) |
There was a problem hiding this comment.
save names(ans)[seq_along(grpcols)] to a variable

Closes #4888
Closes #4891