impl(bigquery): parse numeric types as decimal#6044
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements the FromSql trait for i32, f32, google_cloud_type::model::Decimal, and rust_decimal::Decimal in the BigQuery crate, accompanied by comprehensive unit and integration tests. The review feedback recommends using standard FromStr parsing via str::parse instead of rust_decimal::Decimal::from_str_exact to ensure robust handling of scientific notation and formatting variations.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request implements the FromSql trait for i32, f32, google_cloud_type::model::Decimal, and rust_decimal::Decimal to expand support for numeric types in BigQuery queries, accompanied by comprehensive unit and integration tests. The feedback suggests optimizing the FromSql implementation for rust_decimal::Decimal by avoiding intermediate string allocations and parsing when converting from serde_json::Number, recommending direct numeric conversions instead.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6044 +/- ##
==========================================
+ Coverage 97.02% 97.04% +0.01%
==========================================
Files 253 253
Lines 63547 63682 +135
==========================================
+ Hits 61655 61798 +143
+ Misses 1892 1884 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Towards #5844