diff --git a/encoding/proto/proto.go b/encoding/proto/proto.go index 81f15effd..a10cd5a9e 100644 --- a/encoding/proto/proto.go +++ b/encoding/proto/proto.go @@ -3,6 +3,7 @@ package proto import ( "fmt" + "math/big" "time" "github.com/gogo/protobuf/proto" @@ -1139,11 +1140,20 @@ func (s Serializer) decodeFieldOptions(options *pb.FieldOptions, m *pilosa.Field } func (s Serializer) decodeDecimal(d *pb.Decimal, m *pql.Decimal) { - // err should always be nil, unless there's a problem with the standard library - err := m.GobDecode(d.Gob) - if err != nil { - panic(err) + if !d.NewVersion { + // backwards compatibility + m.SetValue(d.Value) + } else { + // forwards compatibility + val := big.NewInt(0) + // set the absolute value + val.SetBytes(d.ValAbs) + // convert to the correct sign + val.Mul(val, big.NewInt(d.ValSign)) + // set it on the retval + m.SetBigIntValue(val) } + m.Scale = d.Scale } func (s Serializer) decodeNodes(a []*pb.Node, m []*topology.Node) { @@ -1964,10 +1974,14 @@ func (s Serializer) encodeDecimal(p *pql.Decimal) *pb.Decimal { if p == nil { return nil } - gob, _ := p.GobEncode() // ignore err on purpose - return &pb.Decimal{ - Gob: gob, + val := p.Value() + retval := &pb.Decimal{ + Scale: p.Scale, + ValAbs: val.Bytes(), + ValSign: int64(val.Sign()), + NewVersion: true, } + return retval } func (s Serializer) encodeResizeNodeMessage(m *pilosa.ResizeNodeMessage) *pb.ResizeNodeMessage { diff --git a/pb/public.pb.go b/pb/public.pb.go index f4bab252a..e9fd3aa66 100644 --- a/pb/public.pb.go +++ b/pb/public.pb.go @@ -1243,7 +1243,11 @@ func (m *ValCount) GetTimestampVal() string { } type Decimal struct { - Gob []byte `protobuf:"bytes,1,opt,name=Gob,proto3" json:"Gob,omitempty"` + Value int64 `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"` + Scale int64 `protobuf:"varint,2,opt,name=Scale,proto3" json:"Scale,omitempty"` + NewVersion bool `protobuf:"varint,3,opt,name=NewVersion,proto3" json:"NewVersion,omitempty"` + ValAbs []byte `protobuf:"bytes,4,opt,name=ValAbs,proto3" json:"ValAbs,omitempty"` + ValSign int64 `protobuf:"varint,5,opt,name=ValSign,proto3" json:"ValSign,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1282,13 +1286,41 @@ func (m *Decimal) XXX_DiscardUnknown() { var xxx_messageInfo_Decimal proto.InternalMessageInfo -func (m *Decimal) GetGob() []byte { +func (m *Decimal) GetValue() int64 { if m != nil { - return m.Gob + return m.Value + } + return 0 +} + +func (m *Decimal) GetScale() int64 { + if m != nil { + return m.Scale + } + return 0 +} + +func (m *Decimal) GetNewVersion() bool { + if m != nil { + return m.NewVersion + } + return false +} + +func (m *Decimal) GetValAbs() []byte { + if m != nil { + return m.ValAbs } return nil } +func (m *Decimal) GetValSign() int64 { + if m != nil { + return m.ValSign + } + return 0 +} + type DistinctTimestamp struct { Values []string `protobuf:"bytes,1,rep,name=Values,proto3" json:"Values,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` @@ -2649,113 +2681,116 @@ func init() { func init() { proto.RegisterFile("public.proto", fileDescriptor_413a91106d7bcce8) } var fileDescriptor_413a91106d7bcce8 = []byte{ - // 1692 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4b, 0x6f, 0x1b, 0xd7, - 0x15, 0xd6, 0x3c, 0xf8, 0x3a, 0xa4, 0x28, 0xe9, 0x5a, 0x76, 0xc7, 0xb6, 0xcc, 0xd2, 0x83, 0xc2, - 0xa5, 0xab, 0x42, 0x46, 0xd9, 0xc2, 0x28, 0x0c, 0xb4, 0x86, 0x28, 0xca, 0x16, 0x61, 0x4b, 0x76, - 0xaf, 0x54, 0xb5, 0x0b, 0x6f, 0x46, 0xe4, 0x2d, 0x3d, 0xe8, 0x90, 0xc3, 0xcc, 0x0c, 0x4d, 0xe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12, 0x34, 0x56, 0x97, - 0x20, 0x2e, 0x0b, 0x6f, 0x9d, 0xe9, 0x58, 0x8c, 0x28, 0x5d, 0xaa, 0x3c, 0x26, 0x59, 0x27, 0xcd, - 0x4d, 0xc2, 0x57, 0xe5, 0x7a, 0xcc, 0xe3, 0x69, 0xe6, 0xca, 0xca, 0xc2, 0x11, 0x53, 0x91, 0xf1, - 0x91, 0x14, 0x7b, 0x0c, 0xcd, 0x57, 0xde, 0x28, 0xad, 0x9d, 0x50, 0x45, 0xa2, 0x89, 0x76, 0x52, - 0x36, 0x2f, 0x68, 0xb1, 0x27, 0xc5, 0xf9, 0x4e, 0x31, 0xa9, 0x77, 0x99, 0xf2, 0x33, 0x23, 0xe1, - 0xc5, 0x4d, 0x60, 0x37, 0xb3, 0x5e, 0x50, 0xa0, 0xea, 0xdd, 0x75, 0x3c, 0x96, 0x30, 0x79, 0x66, - 0xfd, 0xd8, 0xcb, 0x76, 0x2b, 0xab, 0x4e, 0xda, 0xcd, 0x18, 0x21, 0xc9, 0xe5, 0xd9, 0x7e, 0xb6, - 0x9b, 0x69, 0x8f, 0x56, 0x23, 0x35, 0x9e, 0x30, 0x79, 0xa6, 0x7d, 0x1e, 0xac, 0x58, 0x05, 0xac, - 0x75, 0x3a, 0x54, 0x9c, 0xf3, 0x52, 0xc8, 0x57, 0xac, 0x0e, 0x4f, 0x8a, 0x73, 0xc4, 0x6a, 0xa6, - 0x50, 0xe4, 0x25, 0xbc, 0x38, 0x71, 0x76, 0x33, 0x3b, 0x99, 0xb5, 0x91, 0xbe, 0x36, 0x61, 0xf2, - 0xcc, 0xce, 0xf6, 0x17, 0xa8, 0x67, 0x03, 0xb5, 0x49, 0xea, 0x1b, 0xf9, 0x40, 0x85, 0x3c, 0xab, - 0x83, 0x0e, 0x2e, 0x95, 0xbf, 0xb5, 0x95, 0x3a, 0xb8, 0x24, 0xe4, 0xcb, 0xfa, 0xf6, 0xb7, 0x3a, - 0xac, 0x0f, 0x26, 0x33, 0x3f, 0x88, 0x32, 0x3d, 0x40, 0xae, 0x9d, 0xda, 0xca, 0xb5, 0x53, 0x2f, - 0x74, 0x7a, 0xea, 0x05, 0xd4, 0x08, 0x4d, 0x2e, 0x89, 0x4c, 0x3e, 0x9a, 0xb9, 0x7c, 0xdc, 0x81, - 0x9a, 0x1c, 0x94, 0x28, 0x2a, 0x91, 0x28, 0x65, 0xc8, 0x45, 0x78, 0x41, 0x8b, 0x50, 0x85, 0x3a, - 0x57, 0x4c, 0xb2, 0x16, 0x80, 0x54, 0x23, 0x61, 0x95, 0x84, 0x19, 0x0e, 0xca, 0x13, 0x87, 0x42, - 0xab, 0xdc, 0x36, 0x3a, 0x06, 0xcf, 0x70, 0xd8, 0x03, 0x68, 0x92, 0x13, 0x07, 0x81, 0xc0, 0x66, - 0xb2, 0x1f, 0x51, 0x3e, 0x1b, 0xbc, 0xc0, 0x45, 0x3d, 0x72, 0x2b, 0xd5, 0x93, 0x9d, 0xa6, 0xc0, - 0xa5, 0xb9, 0xe0, 0x09, 0x27, 0xa0, 0x8c, 0xad, 0x72, 0x49, 0xd8, 0x3f, 0xea, 0xc0, 0x24, 0x92, - 0x72, 0xa9, 0xf9, 0xcd, 0xe0, 0xfc, 0x30, 0x6c, 0x79, 0x70, 0x2a, 0x4b, 0xe0, 0xa4, 0xf3, 0x40, - 0x02, 0x13, 0xcf, 0x83, 0x36, 0xd4, 0xe3, 0xb1, 0x85, 0x42, 0x44, 0x55, 0xe3, 0x59, 0x16, 0xce, - 0xa7, 0xd3, 0x08, 0x7f, 0x89, 0x28, 0x95, 0x1a, 0xd9, 0xce, 0xf1, 0x56, 0x40, 0x0b, 0x1f, 0x09, - 0x6d, 0xfd, 0xc3, 0xd0, 0x36, 0xb2, 0xd0, 0x7e, 0xa1, 0x41, 0x63, 0x3f, 0xf2, 0x27, 0xee, 0x90, - 0x8b, 0xa1, 0x1f, 0x8c, 0xae, 0x07, 0x55, 0xc2, 0xa7, 0x67, 0xe1, 0xeb, 0x80,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x85, 0x51, 0xfa, 0xc8, 0xc2, 0x28, 0xaf, 0x2c, 0x8c, 0x0e, 0x6c, 0xfc, - 0x7b, 0x36, 0x72, 0x22, 0x71, 0x78, 0xe9, 0x86, 0x91, 0x98, 0x0e, 0x85, 0x55, 0x21, 0x8f, 0x8a, - 0x6c, 0xfb, 0x73, 0x0d, 0xd6, 0x95, 0x17, 0x52, 0x74, 0xcd, 0x96, 0xce, 0xc0, 0x44, 0xf7, 0xe2, - 0x85, 0x90, 0xe0, 0x4e, 0xd0, 0x32, 0x08, 0x5b, 0x85, 0xd6, 0x26, 0x18, 0xa7, 0x22, 0x52, 0x7f, - 0x4f, 0xe0, 0x27, 0xb6, 0x06, 0x12, 0xc9, 0x72, 0x0c, 0xd5, 0xfe, 0x97, 0xe3, 0xd9, 0x6f, 0xe0, - 0x76, 0x0e, 0x52, 0xaa, 0xc6, 0x38, 0x2c, 0xe9, 0xea, 0xa8, 0xe5, 0x56, 0xc7, 0x3f, 0x42, 0xe9, - 0x3c, 0x13, 0x98, 0x2d, 0x39, 0x2f, 0x33, 0xce, 0x70, 0x29, 0xb7, 0x4f, 0x73, 0xf3, 0x12, 0x7b, - 0xe4, 0xfe, 0x78, 0x1c, 0x88, 0xb1, 0x13, 0xc5, 0xc9, 0x92, 0x32, 0xd8, 0x03, 0x28, 0x93, 0x72, - 0x6c, 0xb6, 0xb8, 0x00, 0x29, 0x69, 0x6f, 0xf3, 0xbb, 0xf7, 0x2d, 0xed, 0x87, 0xf7, 0x2d, 0xed, - 0xa7, 0xf7, 0x2d, 0xed, 0xab, 0x9f, 0x5b, 0x6b, 0x17, 0x65, 0xfa, 0x77, 0xe7, 0xaf, 0xbf, 0x06, - 0x00, 0x00, 0xff, 0xff, 0x51, 0x2f, 0x5d, 0x6f, 0xed, 0x11, 0x00, 0x00, + // 1732 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0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58, 0xcc, 0xc3, 0x55, 0x10, 0xa1, 0xd4, 0x2d, 0xea, + 0x59, 0x71, 0xb9, 0x21, 0x66, 0x3e, 0x74, 0x6e, 0xc3, 0x95, 0x48, 0xb3, 0x60, 0xb5, 0x41, 0x75, + 0xd9, 0xe6, 0x4b, 0x3c, 0xff, 0x2b, 0x0b, 0x1a, 0xea, 0xc8, 0xe1, 0xe7, 0x40, 0xee, 0x74, 0x1e, + 0x44, 0x42, 0x3b, 0x49, 0x04, 0xeb, 0x01, 0xdc, 0x88, 0xdd, 0x4c, 0x24, 0x69, 0x18, 0xaf, 0xc9, + 0xcd, 0x26, 0x37, 0x38, 0xf8, 0x18, 0xb3, 0x20, 0xba, 0xbc, 0x4b, 0xd5, 0xd0, 0x51, 0x14, 0x4e, + 0xa3, 0x59, 0x10, 0xe1, 0x80, 0x20, 0x77, 0x1c, 0xae, 0x49, 0xff, 0x63, 0x38, 0x1d, 0x87, 0x69, + 0x16, 0xae, 0xe7, 0x59, 0xee, 0xa1, 0x32, 0x83, 0x15, 0xae, 0x3a, 0xab, 0xa4, 0xf2, 0x32, 0xb5, + 0x8b, 0x32, 0xf5, 0xff, 0x6a, 0x41, 0xe7, 0x57, 0x5b, 0x91, 0x3c, 0x70, 0xf1, 0x87, 0xad, 0x48, + 0x33, 0xf4, 0x9c, 0x68, 0x9d, 0x3c, 0x44, 0xa0, 0xc9, 0xe9, 0x17, 0x41, 0xb2, 0x90, 0x55, 0xe7, + 0x72, 0x45, 0x51, 0xfa, 0x88, 0x55, 0x9c, 0x09, 0x72, 0xac, 0xc9, 0x15, 0xc5, 0x2e, 0xa0, 0x73, + 0xbd, 0xba, 0x13, 0x8b, 0x85, 0x58, 0x8c, 0x83, 0x2c, 0xf0, 0x9a, 0xe5, 0xa1, 0x57, 0x12, 0xb2, + 0xef, 0xc3, 0xf1, 0xab, 0x44, 0xdc, 0x26, 0xc1, 0x3a, 0x8d, 0x82, 0x4c, 0x2c, 0xbc, 0x16, 0xd9, + 0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, 0xa9, 0x9c, 0x97, 0x46, 0x30, + 0x5c, 0xca, 0xfd, 0x69, 0x69, 0x5e, 0x62, 0x8f, 0xbc, 0x5c, 0x2e, 0x13, 0xb1, 0x0c, 0x32, 0x9d, + 0x2c, 0x05, 0x83, 0xbd, 0x07, 0x75, 0x52, 0xd6, 0x66, 0xab, 0x0b, 0x90, 0x92, 0x8e, 0x4e, 0xfe, + 0xfe, 0xba, 0x67, 0xfd, 0xf3, 0x75, 0xcf, 0xfa, 0xf7, 0xeb, 0x9e, 0xf5, 0xe7, 0xff, 0xf4, 0x8e, + 0xee, 0xea, 0xf4, 0x57, 0xd2, 0x4f, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0x81, 0x34, 0x76, 0x53, + 0x5a, 0x12, 0x00, 0x00, } func (m *Row) Marshal() (dAtA []byte, err error) { @@ -3826,12 +3861,37 @@ func (m *Decimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Gob) > 0 { - i -= len(m.Gob) - copy(dAtA[i:], m.Gob) - i = encodeVarintPublic(dAtA, i, uint64(len(m.Gob))) + if m.ValSign != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.ValSign)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x28 + } + if len(m.ValAbs) > 0 { + i -= len(m.ValAbs) + copy(dAtA[i:], m.ValAbs) + i = encodeVarintPublic(dAtA, i, uint64(len(m.ValAbs))) + i-- + dAtA[i] = 0x22 + } + if m.NewVersion { + i-- + if m.NewVersion { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.Scale != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Scale)) + i-- + dAtA[i] = 0x10 + } + if m.Value != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -5624,10 +5684,22 @@ func (m *Decimal) Size() (n int) { } var l int _ = l - l = len(m.Gob) + if m.Value != 0 { + n += 1 + sovPublic(uint64(m.Value)) + } + if m.Scale != 0 { + n += 1 + sovPublic(uint64(m.Scale)) + } + if m.NewVersion { + n += 2 + } + l = len(m.ValAbs) if l > 0 { n += 1 + l + sovPublic(uint64(l)) } + if m.ValSign != 0 { + n += 1 + sovPublic(uint64(m.ValSign)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -8761,8 +8833,66 @@ func (m *Decimal) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) + } + m.Scale = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Scale |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NewVersion", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.NewVersion = bool(v != 0) + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gob", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValAbs", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -8789,11 +8919,30 @@ func (m *Decimal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Gob = append(m.Gob[:0], dAtA[iNdEx:postIndex]...) - if m.Gob == nil { - m.Gob = []byte{} + m.ValAbs = append(m.ValAbs[:0], dAtA[iNdEx:postIndex]...) + if m.ValAbs == nil { + m.ValAbs = []byte{} } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValSign", wireType) + } + m.ValSign = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValSign |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipPublic(dAtA[iNdEx:]) diff --git a/pb/public.proto b/pb/public.proto index d22f12e74..9a4be75b6 100644 --- a/pb/public.proto +++ b/pb/public.proto @@ -113,7 +113,11 @@ message ValCount { } message Decimal { - bytes Gob = 1; + int64 Value = 1; + int64 Scale = 2; + bool NewVersion = 3; + bytes ValAbs = 4; + int64 ValSign = 5; } message DistinctTimestamp { diff --git a/pql/decimal.go b/pql/decimal.go index 6dda17f22..077c6b1ce 100644 --- a/pql/decimal.go +++ b/pql/decimal.go @@ -2,7 +2,6 @@ package pql import ( - "encoding/binary" "math" "math/big" "strconv" @@ -67,6 +66,10 @@ func (d *Decimal) SetValue(v int64) { d.value = *val } +func (d *Decimal) SetBigIntValue(v *big.Int) { + d.value.Set(v) +} + func (d Decimal) Clone() (r *Decimal) { val := big.NewInt(0) val.Set(&d.value) @@ -77,44 +80,6 @@ func (d Decimal) Clone() (r *Decimal) { return } -func (d *Decimal) GobEncode() ([]byte, error) { - if d == nil { - return nil, nil - } - valBuf, err := d.value.GobEncode() - if err != nil { - return nil, err - } - valSz := len(valBuf) - - // make a buffer the size of our Decimal, plus our 8 byte Scale, - // plus 1 byte for sign of scale - buf := make([]byte, valSz+8) - copy(buf[:valSz], valBuf) - - binary.LittleEndian.PutUint64(buf[valSz:valSz+8], uint64(d.Scale)) - - return buf, nil -} - -func (d *Decimal) GobDecode(buf []byte) error { - if len(buf) == 0 { - // they sent a nil or default value - *d = Decimal{} - return nil - } - - valPart := len(buf) - 8 - value := big.NewInt(0) - if err := value.GobDecode(buf[:valPart]); err != nil { - return err - } - d.value = *value - - d.Scale = int64(binary.LittleEndian.Uint64(buf[valPart : valPart+8])) - return nil -} - // NewDecimal returns a Decimal based on the provided arguments. func NewDecimal(value, scale int64) Decimal { v := big.NewInt(value) diff --git a/pql/decimal_internal_test.go b/pql/decimal_internal_test.go index 5b3b10ea2..dd56ba6cf 100644 --- a/pql/decimal_internal_test.go +++ b/pql/decimal_internal_test.go @@ -2,9 +2,7 @@ package pql import ( "fmt" - "math" "math/big" - "reflect" "testing" ) @@ -90,44 +88,3 @@ func mustParse(t *testing.T, num string) Decimal { } return d } - -func TestGobEncodeDecode(t *testing.T) { - for i := int64(-10); i < 10; i++ { - for j := int64(-10); j < 10; j++ { - decimal := &Decimal{value: *(big.NewInt(i)), Scale: j} - t.Run(fmt.Sprintf("v%ds%d", i, j), func(t *testing.T) { - encoded, err := decimal.GobEncode() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - decoded := &Decimal{} - err = decoded.GobDecode(encoded) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !reflect.DeepEqual(decimal, decoded) { - t.Errorf("%v != %v", decimal, encoded) - } - }) - } - } - - i := int64(math.MaxInt64) - j := int64(math.MinInt64) - decimal := &Decimal{value: *(big.NewInt(i)), Scale: j} - t.Run(fmt.Sprintf("v%ds%d", i, j), func(t *testing.T) { - encoded, err := decimal.GobEncode() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - decoded := &Decimal{} - err = decoded.GobDecode(encoded) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !reflect.DeepEqual(decimal, decoded) { - t.Errorf("%v != %v", decimal, encoded) - } - }) - -}