Skip to content

Incorrect printing of integer64 columns #6224

@renkun-ken

Description

@renkun-ken

Here is a minimal reproducible example:

library(data.table)

dt <- data.table(id = 1:10, int64 = bit64::as.integer64(1:10))
fst::write_fst(dt, "dt.fst")

Start a new session without bit64 being loaded.

> library(data.table)

> dt <- fst::read_fst("dt.fst", as.data.table = TRUE)
fstcore package v0.9.18
(OpenMP was not detected, using single threaded mode)

> dt
       id         int64
    <int>         <i64>
 1:     1 4.940656e-324
 2:     2 9.881313e-324
 3:     3 1.482197e-323
 4:     4 1.976263e-323
 5:     5 2.470328e-323
 6:     6 2.964394e-323
 7:     7 3.458460e-323
 8:     8 3.952525e-323
 9:     9 4.446591e-323
10:    10 4.940656e-323

> dt
       id int64
    <int> <i64>
 1:     1     1
 2:     2     2
 3:     3     3
 4:     4     4
 5:     5     5
 6:     6     6
 7:     7     7
 8:     8     8
 9:     9     9
10:    10    10

It looks like fst::read_fst does not load bit64 automatically if there are integer64 columns in the data. I'm not sure if it better handled on data.table side: if the table contains integer64 columns, bit64 should be loaded in print.data.table.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions