-
Notifications
You must be signed in to change notification settings - Fork 183
fix(mysql): float values from binlog are not always same as MySQL SELECT output #723
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
base: staging
Are you sure you want to change the base?
Conversation
|
@vimla01 Please rebase your PR to staging instead of master. Also please add a small video of you showing how you have tested your work, it makes easier for us to know you are in the right direction. |
a555b19 to
044c863
Compare
|
I’ve added a short testing video to the PR description. Please let me know if anything else is needed. @nayanj98
|
|
hi @vimla01 can you make the video access "anyone with the link" |
I’ve updated the video permissions to “Anyone with the link” |
|
@vimla01 Apologies for the delay, just checked your video, it seems you have uploaded a video of running your test file. If you can read the description of the issue and make a video replicating the same workflow with your changes that would be helpful. Also you can check on iceberg by running |
Thanks for the feedback. @nayanj98 |
Description
In MySql ,
FLOATcolumns are stored as binary float32 values. However, binlog events can expose these values as higher-precision float64 representations, which causes OLake to emit values with extra precision compared to the column’s actual datatype semantics.This leads to inconsistencies between values produced by OLake (from binlog reads) and values enforced by MySQL for
FLOATcolumns.This change fixes the issue by enforcing MySQL
FLOAT(float32) semantics on binlog values.The implementation casts binlog float values back to float32 (removing the extra precision without performing any manual formatting, rounding, or interpretation)
Fixes #706
Type of change
How Has This Been Tested?
FLOATdatatype behavior .Testing Video:
Float_mysqll.webm
The issue was reproduced locally to confirm its validity, after which the fix was implemented. Screenshots attached.
After fix