Skip to content

shift(nanotime, fill=NA) does not fill nanotime NA #3945

@mschubmehl

Description

@mschubmehl

Calling shift on a nanotime does not identify the nanotime as inheriting from bit64::integer64, and thus fills the numeric NA instead of the integer64:

data.table::shift(nanotime::nanotime(1:4))
[1] "2262-02-18T20:47:17.227407266+00:00" "1970-01-01T00:00:00.000000001+00:00"
[3] "1970-01-01T00:00:00.000000002+00:00" "1970-01-01T00:00:00.000000003+00:00"

Fixed by #3942:

[1] NA                                    "1970-01-01T00:00:00.000000001+00:00"
[3] "1970-01-01T00:00:00.000000002+00:00" "1970-01-01T00:00:00.000000003+00:00"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions