-
Notifications
You must be signed in to change notification settings - Fork 58
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
Fix bigint
marshal, unmarshall
#291
Conversation
271b9c1
to
61997b4
Compare
61997b4
to
d02462e
Compare
bigint
marshal, unmarshallbigint
marshal, unmarshall
9867011
to
bbf22b5
Compare
Please take a look again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for me it LGTM, @dkropachev could you take a look?
marshal.go
Outdated
@@ -562,7 +584,7 @@ func marshalVarint(info TypeInfo, value interface{}) ([]byte, error) { | |||
binary.BigEndian.PutUint64(retBytes, v) | |||
} | |||
default: | |||
retBytes, err = marshalBigInt(info, value) | |||
retBytes, err = marshalCounter(info, value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change it to marshalCounter
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see these changes.
Renamed into marshalBigIntOld
.
bbf22b5
to
d174e0c
Compare
d174e0c
to
050e624
Compare
Fixed for
bigint
type:string
marshal and unmarshal asnullable
.1.1. Before: marshals
""
- caused an error; unmarshalsnil data
into"0"
.1.2. Now: marshals and unmarshals
nil data
-""
.custom string
marshals and unmarshals, beforenot supported
, nowsupported
.big.Int
marshals, beforenot supported
, nowsupported
.math.MaxUint64
, intouint64
,uint
, returnerror' before, now
no error`.data
with the length is different from0
and8
, did not returnerror
before, now it returns `error'.Close issues for
bigint
:cql types
unmarshaling data that have bigger len thancql type
, do not return an error. #246cql types
ago string
is supported, but not ago custom string
#243cql types
:tinyint
,smallint
,int
can not be marshaled intogo big.Int
#244zero
andnull
data and values. #250cql types
unmarshaling data that have smaller len thancql type
, do not return an error. #252