-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support FLOAT32 type in Spanner Migration Tool. #872
Conversation
Actually this made me wonder if the changes around Float32 - Dataflow and SMT, are backward compatible? If I have a customer who has already mapped float to float64 in a previous schema migration, and uses the new dataflow template with the changes you made recently, will anything break? Please walk through the cases therein once. ( |
@manitgupta IIUC if the spanner migration tool has already converted a schema and float32 from sourcedb is mapped to float64 in spanner, DataFlow will still process the events correctly as float64 values. I believe this happens because DataFlow templates use the current Spanner schema to make the choice of whether to parse the input change as FLOAT64 or FLOAT32. So these steps should result in a backward compatible migration. LMK if I missed something! |
Yes, you're right. The spanner schema is used to infer the data type. So last as long the spanner schema has something that the pipeline is able to cast to, we will be good. On the other hand, if the customer decides to regenerate the spanner schema using SMT, there data types will change to Float32 from Float64. This should be okay if the customer is redoing a migration. This leaves only the Consider this example -
Can you validate what is the value of spanner data type that appears from when loading from session file? Ideally, it should load from |
Thanks @manitgupta! As mentioned offline, I've verified that the loading the old session file still uses the previous mapping of |
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.
Just one comment regarding float -> FLOAT64 mapping option
@manitgupta @shreyakhajanchi gentle ping! |
4a3ad4c
to
f8f14f9
Compare
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.
LGTM
This changes the existing behavior of widening a source float32 type into float64 in spanner, and instead mapping the source float32 type to spanner's new float32 type. We still allow float32 to be manually mapped to float64 if the customer intends to do that.
This changes the existing behavior of widening a source float32 type into float64 in spanner, and instead mapping the source float32 type to spanner's new float32 type.
This is a re-patch of #785