incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hood <0x6e6...@gmail.com>
Subject Re: CQL decimal encoding
Date Wed, 26 Feb 2014 07:53:41 GMT
Hey Colin,

On Tue, Feb 25, 2014 at 10:26 PM, Colin Blower <cblower@barracuda.com> wrote:
> It looks like you are trying to implement the Decimal type. You might want
> to start with implementing the Integer type. The Decimal type follows pretty
> easily from the Integer type.
>
> For example:
> i = unmarchalInteger(data[4:])
> s = decInt(data[0:4])
> out = inf.newDec(i, s)

Thanks for the suggestion.

This is pretty much what I've got already. I think the issue might be
to do with the way that big.Int doesn't appear to use two's complement
to encode the varint. Maybe what is happening is that the encoding is
isomorphic across say Java, .NET, Python and Ruby, but that the
big.Int library in Go is not encoding in the same way.

Cheers,

Ben

Mime
View raw message