fix(bigquery-driver): Return int64/float64 as strings in query/stream#10738
fix(bigquery-driver): Return int64/float64 as strings in query/stream#10738
Conversation
|
Claude finished @ovr's task in 1m 43s —— View job Code Review: fix(bigquery-driver): Return int64/float64 as strings
Overall: This is a clean, well-scoped fix. The PR correctly addresses JavaScript How it worksThe fix has two complementary parts:
This gives complete coverage:
Detailed Feedback
if (typeof value === 'number') {
if (Number.isFinite(value)) {
return value.toString();
}
return value; // NaN, Infinity, -Infinity returned as-is
}The guard for
if (value && value.value && typeof value.value === 'string') {
return value.value;
}This predates this PR but is worth calling out: this check matches any object with a truthy string
The
Tests Good coverage:
One suggestion: it could be valuable to add a test case for SummaryNo issues found. The change is focused, correct, and well-tested. The numeric type → string normalization is consistent with NUMERIC/BIGNUMERIC behavior and prevents real precision bugs for large integers and floating-point values. LGTM. |
6bae1f0 to
ebbe153
Compare
ebbe153 to
4de2ef3
Compare
4de2ef3 to
6d267fa
Compare
Normalize numeric hydration so integer and floating-point columns are returned as strings, matching the existing NUMERIC/BIGNUMERIC behavior and avoiding JS `Number` precision pitfalls.
6d267fa to
a2a7746
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10738 +/- ##
==========================================
+ Coverage 58.02% 58.03% +0.01%
==========================================
Files 215 215
Lines 16689 16693 +4
Branches 3358 3360 +2
==========================================
+ Hits 9683 9688 +5
Misses 6514 6514
+ Partials 492 491 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Normalize numeric hydration so integer and floating-point columns are returned as strings, matching the existing NUMERIC/BIGNUMERIC behavior and avoiding JS
Numberprecision pitfalls.