Skip to content

feat(testdata): Let destinations bound generated 64-bit integers - #2554

Open
murarustefaan wants to merge 1 commit into
mainfrom
fix/testdata-large-integer-precision
Open

feat(testdata): Let destinations bound generated 64-bit integers#2554
murarustefaan wants to merge 1 commit into
mainfrom
fix/testdata-large-integer-precision

Conversation

@murarustefaan

Copy link
Copy Markdown
Member

Current

arrow-go v18.7.0 fixed large-integer precision in JSON decoding (apache/arrow-go#816), and TestDataGenerator builds records via builder.UnmarshalJSON — so until now every int64/uint64 it produced was silently rounded to a float64-representable value. They are now exact, which turned 16 destination plugins red because their storage or wire format round-trips integers through float64.

Expected

Destinations declare the integer width they can represent exactly via MaxIntegerBits (schema.Float64SafeIntegerBits for the float64 case). Unset keeps the full 64-bit range, so consumers that do not opt in are unaffected, and TableDiff now names the option when a differing column matches after a float64 round-trip.

Why / Impact

Test-only API, additive, no behaviour change without opt-in; timestamp_ns already handles this same root cause unconditionally, and keeping this opt-in preserves real 64-bit coverage for destinations that are correct. Verified end-to-end: the file destination's csv failure at arrow-go v18.7.0 passes with MaxIntegerBits: 53, and removing any plumbing line now fails TestPluginFloat64Ints.

🤖 Generated with Claude Code

arrow-go v18.7.0 fixed large-integer precision in JSON decoding
(apache/arrow-go#816). The test data generator builds records via
builder.UnmarshalJSON, so until now every int64/uint64 it produced was
silently rounded to a float64-representable value. They are now exact,
and destinations whose storage or wire format round-trips integers
through float64 cannot reproduce them.

MaxIntegerBits lets those destinations declare the width they can
represent exactly. Unset keeps the full 64-bit range, so consumers that
do not opt in are unaffected. TableDiff now points at the option when a
differing column matches after a float64 round-trip.

Timestamp_ns already handles the same root cause unconditionally; the
opt-in keeps real 64-bit coverage for destinations that are correct.
@murarustefaan
murarustefaan requested a review from a team as a code owner August 3, 2026 15:43
@murarustefaan
murarustefaan requested a review from erezrokah August 3, 2026 15:43

@erezrokah erezrokah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some overlap with #2553 I think, @disq fixed this already in cloudquery/filetypes@b25d89f

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.

2 participants