Skip to content

Conversation

@vimla01
Copy link

@vimla01 vimla01 commented Jan 2, 2026

Description

In MySql , FLOAT columns 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 FLOAT columns.

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

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Verified locally by simulating binlog float64 inputs and confirming that casting to float32 removes extra precision and aligns with MySQL FLOAT datatype behavior .

Testing Video:
Float_mysqll.webm

The issue was reproduced locally to confirm its validity, after which the fix was implemented. Screenshots attached.

before

After fix

image

@CLAassistant
Copy link

CLAassistant commented Jan 2, 2026

CLA assistant check
All committers have signed the CLA.

@nayanj98
Copy link
Collaborator

nayanj98 commented Jan 2, 2026

@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.

@vimla01
Copy link
Author

vimla01 commented Jan 2, 2026

I’ve added a short testing video to the PR description. Please let me know if anything else is needed. @nayanj98

@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.

@vimla01 vimla01 closed this Jan 2, 2026
@vimla01 vimla01 reopened this Jan 2, 2026
@vimla01 vimla01 changed the base branch from master to staging January 2, 2026 16:38
@Akshay-datazip
Copy link
Collaborator

hi @vimla01 can you make the video access "anyone with the link"
As right now it has access issues

@vimla01
Copy link
Author

vimla01 commented Jan 4, 2026

hi @vimla01 can you make the video access "anyone with the link" As right now it has access issues

I’ve updated the video permissions to “Anyone with the link”
Please let me know if you’re able to access it now @Akshay-datazip

@nayanj98
Copy link
Collaborator

nayanj98 commented Jan 5, 2026

@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 SELECT * FROM table query and check if it is fixed.

@vimla01
Copy link
Author

vimla01 commented Jan 5, 2026

@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 SELECT * FROM table query and check if it is fixed.

Thanks for the feedback. @nayanj98
I’ve uploaded a new video reproducing the exact workflow described in the issue with my changes applied.
I confirmed the bug locally before fixing it and verified the fix on Iceberg using a
SELECT * FROM table query.
Please let me know if further changes are required @Akshay-datazip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: float values from binlog are not always same as the output of select * query of db

4 participants