Skip to content

[R-Forge #5659] key is not retained after join on factor columns #477

Closed

Description

@arunsrinivasan

Submitted by: Gerhard Nachtmann; Assigned to: Nobody; R-Forge link

Description here.

Activity

  1. arunsrinivasan commented on Jun 10, 2014

    @arunsrinivasan
    MemberAuthor

    It's not just on factor columns. It's basically due to recent changes in 1.9.3 in this part of [.data.table:

    if (haskey(x)) {
        keylen = which.first(!key(x) %chin% ansvars)-1L
        if (is.na(keylen)) keylen = length(key(x))
        if (keylen > length(rightcols) && !.Call(CisOrderedSubset, irows, nrow(x))) keylen = length(rightcols)
        if (keylen && ((is.data.table(i) && haskey(i)) || is.logical(i) || .Call(CisOrderedSubset, irows, nrow(x))))
            setattr(ans,"sorted",head(key(x),keylen))
    }

    Here CisOrderedSubset doesn't provide required result when there's NA (IIRC from debugging it sometime back).

    And IIUC, this is how it was before.

  2. nachti commented on Jun 11, 2014

    @nachti
    Contributor

    Thanks for the migration from R-Forge!

  3. added this to the v1.9.4 milestone on Jun 19, 2014
  4. modified the milestones: , on Sep 6, 2014
  5. modified the milestones: v1.9.6, v1.9.8 on Oct 10, 2014
  6. modified the milestones: v1.9.6, v1.9.8 on Jul 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions