rbetts / voltdbgo

[Deprecated] VoltDB driver for Google go (golang)
Other
31 stars 8 forks source link

Fix float64 de/serialization #6

Closed martinhpedersen closed 10 years ago

martinhpedersen commented 10 years ago

Hi Ryan - Discovered a bug while trying to insert float64 into a FLOAT column.

Turns out both serialization and deserialization is broken, so I wrote some tests and fixed the issue by using math.Float64bits()/Float64frombits() for converting to/from uint32 after/before reading/writing the raw bytes.

Have confirmed the fix by round-tripping through a voltdb instance :)