Skip to content
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

BINARY_DOUBLE Datatype #217

Closed
AhmedEmad92 opened this issue Jun 28, 2022 · 3 comments
Closed

BINARY_DOUBLE Datatype #217

AhmedEmad92 opened this issue Jun 28, 2022 · 3 comments

Comments

@AhmedEmad92
Copy link

**There are a big issue when selecting from table has column with BINARY_DOUBLE datatype and has value 0
the value come to the as struct float64(30.8) !! I don't know from where this number came **

@sijms
Copy link
Owner

sijms commented Jul 16, 2022

sorry for late replay I will investigate the issue as soon as possible and feedback to you

@tboudalier
Copy link
Contributor

The fix will most likely be in the code added in v2/converters/other_types.go.

I suggest to look at how the value 0 is encoded on the wire using

BINARY_FLOAT and BINARY_DOUBLE encoding observed using
 SELECT dump(cast(0 as binary_double) FROM dual;

and then adapt ConvertBinaryFloat and ConvertBinaryDouble for this (corner?) case.

Also would be a good idea to add a non regression test in v2/converters/other_types_test.go.

sorry, cannot look at this right now, I no one takes it, I may have time in the coming days/weeks.

@sijms
Copy link
Owner

sijms commented Jul 20, 2022

fixed you can test it now

sijms added a commit that referenced this issue Jul 20, 2022
1- issue #217 related to binary double and float
2- avoid calling cgo function user.Current() if you define $USER
sijms added a commit that referenced this issue Jul 20, 2022
1- issue #217 related to binary double and float
2- avoid calling cgo function user.Current() if you define $USER
@sijms sijms closed this as completed Jul 21, 2022
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

No branches or pull requests

3 participants