Skip to content

fix(write): preserve exact JSON timestamps - #73

Open
efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/exact-json-timestamps
Open

efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/exact-json-timestamps

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

JSON writes converted decimal and exponent timestamps through float64, changing values such as 1.700000000000000001e18 to 1700000000000000000. Parse them as exact decimal integers instead, preserving nanosecond precision and rejecting fractional or out-of-range epochs. Adds row/columnar regression tests, comparisons against rational arithmetic and a check of the uploaded MessagePack bytes.

On macOS arm64 with Go 1.27.1, go test -race -count=1 ./... passed on the second full run; go vet ./..., go build ./..., gofmt -l . and git diff --check also passed. The first full run failed in unchanged TestFetchPreservesDownloadError/forbidden with context canceled instead of HTTP 403; ten isolated reruns passed. The timestamp regressions failed before the fix. Linux CI and the GoReleaser snapshot have not been run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant