Be aware and potentially resolve the fact that the Date object in Swift is not perfectly represented by an Int64 in nanoseconds.
This can potentially cause several problems:
A Date() converted to nanoseconds and then back to a Date() may not be equal to the original Date value because of floating point imprecision.
Converting a string such as "171525815.9161715" into a Date and then to an Int64 can lose precision due to floating point imprecision.
For now I will take on this imprecision but in the future I would like to fix it.
One solution to this would be to always store and manipulates Datetimes as Int64 as nanoseconds since the unix epoch. This would require changes in the BigQuery schema and how the data from FTX are converted into BigQuery data.
Be aware and potentially resolve the fact that the
Date
object in Swift is not perfectly represented by an Int64 in nanoseconds.This can potentially cause several problems:
Date()
converted to nanoseconds and then back to aDate()
may not be equal to the originalDate
value because of floating point imprecision.Date
and then to an Int64 can lose precision due to floating point imprecision.For now I will take on this imprecision but in the future I would like to fix it.
One solution to this would be to always store and manipulates Datetimes as
Int64
as nanoseconds since the unix epoch. This would require changes in the BigQuery schema and how the data from FTX are converted into BigQuery data.