Repository navigation
Fix long event ages on DiskGraph nanosecond clocks (C-027) - #514
Conversation
Change mapC-027 failed before DiskGraph delivered the batch for a 105-day-old event. Its four cases exercise both sides of the Arrow conversion boundary on microsecond and nanosecond clocks.
|
|
Note
|
Victsm
left a comment
There was a problem hiding this comment.
Checked integer tick subtraction followed by the existing float conversion fixes ordinary long histories on nanosecond clocks without losing short-interval precision first. All 7 focused time-delta tests passed.
Fixes #497.
File-by-file change map
On a nanosecond clock, a 105-day event age is 9,072,000,000,000,000 ticks. Arrow's default cast rejects that count even though the requested result, 9,072,000 seconds, fits in float64.
DiskGraph now subtracts timestamps in integer ticks and converts the elapsed ticks with the package's existing float64 helper. Checked subtraction catches a true int64 overflow before it can produce a negative age.
Verification
Reused C-027 from #447 with native DiskGraph and Parquet anchors. On main (
2a3872ead), the 105-day nanosecond case failed and the three controls passed. On this branch all four pass. The event-age, temporal-declaration, native latest-anchor and DiskGraph backend modules passed all 61 tests. Ruff passed.