-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Convert integral values to String before converting to Value #1056
Conversation
"batch_id" => params.batch.id.clone(), | ||
"timestamp" => as_rfc3339.clone(), | ||
}; | ||
sqlparam_types.insert("timestamp".to_owned(), as_type(TypeCode::TIMESTAMP)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOT THAT WE NEED TO DO THIS NOW
But we really could take advantage of they SyncTimestamp type better for stuff like this.
(heh, Good first bug material.)
@jrconlin I took a stab at having SQL parameter types automatically generated by the same macro that builds the param hashmaps. In short, I updated the
|
As for the comments:
|
I ran the spanner tests locally and they all passed 🙌🏻 |
Description
In the
ToSpannerValue
implementations fori32
andu32
, we were usingValue::set_number_value()
to construct aValue
from an integer. In doing so, we coerced the integers into floats, which is what created the errors on Spanner. To resolve this, I convert the integral values to strings prior to creating aValue
.Testing
The issue can be reproduced on the main branch by adding a new bookmark and syncing (your local server should throw the same error that appeared in Sentry. Switching to this feature branch, adding a new bookmark, (recompiling,) and syncing should result in a successful sync, with no errors reported.
Issue(s)
Closes #1055