iconara / cql-rb

Cassandra CQL 3 binary protocol driver for Ruby
106 stars 31 forks source link

BigDecimal encoding for decimals ending in .0 or 00.0 #114

Closed ahisbrook closed 10 years ago

ahisbrook commented 10 years ago

Found an error where storing a BigDecimal ending in .0 or 00.0 would not store/retrieve correctly. Traced this to the append_decimal method of CqlByteBuffer

Example: Encoding a BigDecimal of 1042342234234.0 would result in a decoded decimal of -57169393542.0 Encoding a BigDecimal of 12000.0 was unable to be decoded

iconara commented 10 years ago

Thanks for the PR. I assume you close this because you found 63271fbb15a83c4ed588bcead9384828ff30d416? Even though it was fixed I appreciate your effort.