Open grische opened 4 months ago
@mholt I also think that other types but int
might be actually harmful for many use cases. Imagine one is an ID and this ID is of int64 and just incremented. The example json might just contain the first few samples, i.e. turning into an int8
and then causing problems later on.
If you are OK with #141 I will hide this feature behind a flag (--small-ints
maybe?) and leave the default to be int
.
Note: the size of int
is probably already int64
, depending on the platform being used.
I have prepared a commit for the new flag: a930048d431d32f085eb7d7574ca6ccba74eb17c
Once we have decided on how to proceed with #144 , I can update this PR.
This fixes a bug where an int64 was detected for a number larger than the largest int64 number. The number
9993372000000000000
was detected as int64, despite the fact that it is outside of the limit9223372036854775807
because9993372030000000000 % 1 == 0
, but well within float64 limits.If the other data types are unwanted, let me know.