Fixed subsetting / join bug with keys and factor to character coercion. #2926
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2881.
Unfortunately, my PR #2389, that introduced partial key retainment when assigning to columns, introduced a regression in
bmerge.R.bmerge.Rassumed implicitely that anyset()operation removes a key completely if it assigns to a key column. In contrast, the mentioned PR made it possible that a reduced key still exists when assigning to a key column.I have done the following:
bmerge.Rso that it checks internally if the key oniis correct, instead of using theioargument. This was also mentioned as a TODO inbmerge.Rsourcecode.ioargument), so I changed all calls tobmerge.R.sortedattribute at the end ofdata.table.Rhad to be modified.No existing tests were modified and a new test added.
This regression should occur very rarely, but if it does, it is very bad. Therefore, it might make sense to issue a quick bugfix release to CRAN rather soon?