migrated internal.Bitmap to internal.Row

This commit is contained in:
Todd Gruben 2018-05-21 13:08:45 -05:00
parent 6d7178ca91
commit 5b2f8b4c33
6 changed files with 91 additions and 91 deletions

View file

@ -1520,7 +1520,7 @@ func (e *Executor) remoteExec(ctx context.Context, node *Node, index string, q *
case "SetRowAttrs":
case "SetColumnAttrs":
default:
v, err = decodeBitmap(pb.Results[i].GetBitmap()), nil
v, err = decodeRow(pb.Results[i].GetRow()), nil
}
if err != nil {
return nil, err

View file

@ -1158,7 +1158,7 @@ func (h *Handler) handleGetVersion(w http.ResponseWriter, r *http.Request) {
// QueryResult types.
const (
QueryResultTypeNil uint32 = iota
QueryResultTypeBitmap
QueryResultTypeRow
QueryResultTypePairs
QueryResultTypeValCount
QueryResultTypeUint64
@ -1244,8 +1244,8 @@ func encodeQueryResponse(resp *QueryResponse) *internal.QueryResponse {
switch result := resp.Results[i].(type) {
case *Row:
pb.Results[i].Type = QueryResultTypeBitmap
pb.Results[i].Bitmap = encodeBitmap(result)
pb.Results[i].Type = QueryResultTypeRow
pb.Results[i].Row = encodeRow(result)
case []Pair:
pb.Results[i].Type = QueryResultTypePairs
pb.Results[i].Pairs = encodePairs(result)

View file

@ -482,11 +482,11 @@ func TestHandler_Query_Row_Protobuf(t *testing.T) {
var resp internal.QueryResponse
if err := proto.Unmarshal(w.Body.Bytes(), &resp); err != nil {
t.Fatal(err)
} else if rt := resp.Results[0].Type; rt != pilosa.QueryResultTypeBitmap {
} else if rt := resp.Results[0].Type; rt != pilosa.QueryResultTypeRow {
t.Fatalf("unexpected response type: %d", resp.Results[0].Type)
} else if bits := resp.Results[0].Bitmap.Bits; !reflect.DeepEqual(bits, []uint64{1, SliceWidth + 1}) {
} else if bits := resp.Results[0].Row.Bits; !reflect.DeepEqual(bits, []uint64{1, SliceWidth + 1}) {
t.Fatalf("unexpected bits: %+v", bits)
} else if attrs := resp.Results[0].Bitmap.Attrs; len(attrs) != 3 {
} else if attrs := resp.Results[0].Row.Attrs; len(attrs) != 3 {
t.Fatalf("unexpected attr length: %d", len(attrs))
} else if k, v := attrs[0].Key, attrs[0].StringValue; k != "a" || v != "b" {
t.Fatalf("unexpected attr[0]: %s=%v", k, v)
@ -541,11 +541,11 @@ func TestHandler_Query_Row_ColumnAttrs_Protobuf(t *testing.T) {
if err := proto.Unmarshal(w.Body.Bytes(), &resp); err != nil {
t.Fatal(err)
}
if bits := resp.Results[0].Bitmap.Bits; !reflect.DeepEqual(bits, []uint64{1, SliceWidth + 1}) {
if bits := resp.Results[0].Row.Bits; !reflect.DeepEqual(bits, []uint64{1, SliceWidth + 1}) {
t.Fatalf("unexpected bits: %+v", bits)
} else if rt := resp.Results[0].Type; rt != pilosa.QueryResultTypeBitmap {
} else if rt := resp.Results[0].Type; rt != pilosa.QueryResultTypeRow {
t.Fatalf("unexpected response type: %d", resp.Results[0].Type)
} else if attrs := resp.Results[0].Bitmap.Attrs; len(attrs) != 3 {
} else if attrs := resp.Results[0].Row.Attrs; len(attrs) != 3 {
t.Fatalf("unexpected attr length: %d", len(attrs))
} else if k, v := attrs[0].Key, attrs[0].StringValue; k != "a" || v != "b" {
t.Fatalf("unexpected attr[0]: %s=%v", k, v)

View file

@ -8,7 +8,7 @@
public.proto
It has these top-level messages:
Bitmap
Row
Pair
ValCount
Bit
@ -42,32 +42,32 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Bitmap struct {
type Row struct {
Bits []uint64 `protobuf:"varint,1,rep,packed,name=Bits" json:"Bits,omitempty"`
Keys []string `protobuf:"bytes,3,rep,name=Keys" json:"Keys,omitempty"`
Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"`
}
func (m *Bitmap) Reset() { *m = Bitmap{} }
func (m *Bitmap) String() string { return proto.CompactTextString(m) }
func (*Bitmap) ProtoMessage() {}
func (*Bitmap) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{0} }
func (m *Row) Reset() { *m = Row{} }
func (m *Row) String() string { return proto.CompactTextString(m) }
func (*Row) ProtoMessage() {}
func (*Row) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{0} }
func (m *Bitmap) GetBits() []uint64 {
func (m *Row) GetBits() []uint64 {
if m != nil {
return m.Bits
}
return nil
}
func (m *Bitmap) GetKeys() []string {
func (m *Row) GetKeys() []string {
if m != nil {
return m.Keys
}
return nil
}
func (m *Bitmap) GetAttrs() []*Attr {
func (m *Row) GetAttrs() []*Attr {
if m != nil {
return m.Attrs
}
@ -356,7 +356,7 @@ func (m *QueryResponse) GetColumnAttrSets() []*ColumnAttrSet {
type QueryResult struct {
Type uint32 `protobuf:"varint,6,opt,name=Type,proto3" json:"Type,omitempty"`
Bitmap *Bitmap `protobuf:"bytes,1,opt,name=Bitmap" json:"Bitmap,omitempty"`
Row *Row `protobuf:"bytes,1,opt,name=Row" json:"Row,omitempty"`
N uint64 `protobuf:"varint,2,opt,name=N,proto3" json:"N,omitempty"`
Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs" json:"Pairs,omitempty"`
ValCount *ValCount `protobuf:"bytes,5,opt,name=ValCount" json:"ValCount,omitempty"`
@ -375,9 +375,9 @@ func (m *QueryResult) GetType() uint32 {
return 0
}
func (m *QueryResult) GetBitmap() *Bitmap {
func (m *QueryResult) GetRow() *Row {
if m != nil {
return m.Bitmap
return m.Row
}
return nil
}
@ -547,7 +547,7 @@ func (m *ImportValueRequest) GetValues() []int64 {
}
func init() {
proto.RegisterType((*Bitmap)(nil), "internal.Bitmap")
proto.RegisterType((*Row)(nil), "internal.Row")
proto.RegisterType((*Pair)(nil), "internal.Pair")
proto.RegisterType((*ValCount)(nil), "internal.ValCount")
proto.RegisterType((*Bit)(nil), "internal.Bit")
@ -560,7 +560,7 @@ func init() {
proto.RegisterType((*ImportRequest)(nil), "internal.ImportRequest")
proto.RegisterType((*ImportValueRequest)(nil), "internal.ImportValueRequest")
}
func (m *Bitmap) Marshal() (dAtA []byte, err error) {
func (m *Row) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
@ -570,7 +570,7 @@ func (m *Bitmap) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *Bitmap) MarshalTo(dAtA []byte) (int, error) {
func (m *Row) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
@ -988,11 +988,11 @@ func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.Bitmap != nil {
if m.Row != nil {
dAtA[i] = 0xa
i++
i = encodeVarintPublic(dAtA, i, uint64(m.Bitmap.Size()))
n5, err := m.Bitmap.MarshalTo(dAtA[i:])
i = encodeVarintPublic(dAtA, i, uint64(m.Row.Size()))
n5, err := m.Row.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
@ -1260,7 +1260,7 @@ func encodeVarintPublic(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *Bitmap) Size() (n int) {
func (m *Row) Size() (n int) {
var l int
_ = l
if len(m.Bits) > 0 {
@ -1439,8 +1439,8 @@ func (m *QueryResponse) Size() (n int) {
func (m *QueryResult) Size() (n int) {
var l int
_ = l
if m.Bitmap != nil {
l = m.Bitmap.Size()
if m.Row != nil {
l = m.Row.Size()
n += 1 + l + sovPublic(uint64(l))
}
if m.N != 0 {
@ -1569,7 +1569,7 @@ func sovPublic(x uint64) (n int) {
func sozPublic(x uint64) (n int) {
return sovPublic(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Bitmap) Unmarshal(dAtA []byte) error {
func (m *Row) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@ -1592,10 +1592,10 @@ func (m *Bitmap) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Bitmap: wiretype end group for non-group")
return fmt.Errorf("proto: Row: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Bitmap: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: Row: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -2833,7 +2833,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error {
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Bitmap", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field Row", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@ -2857,10 +2857,10 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Bitmap == nil {
m.Bitmap = &Bitmap{}
if m.Row == nil {
m.Row = &Row{}
}
if err := m.Bitmap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
if err := m.Row.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@ -3795,50 +3795,50 @@ var (
func init() { proto.RegisterFile("public.proto", fileDescriptorPublic) }
var fileDescriptorPublic = []byte{
// 705 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6e, 0xd3, 0x40,
0x14, 0x65, 0x62, 0x27, 0x71, 0x6e, 0x92, 0xaa, 0x1a, 0x41, 0xb1, 0x10, 0x8a, 0x2c, 0x8b, 0x85,
0x57, 0xa9, 0x14, 0xf6, 0x20, 0xd2, 0x87, 0x14, 0x55, 0x54, 0x30, 0x2d, 0x61, 0xed, 0xb6, 0xa3,
0x62, 0xc9, 0x2f, 0xec, 0xb1, 0xda, 0x7c, 0x07, 0x1b, 0x3e, 0x81, 0x8f, 0x60, 0xc5, 0x0a, 0x76,
0x7c, 0x02, 0x94, 0x1f, 0x41, 0xf7, 0x8e, 0x27, 0x76, 0x5a, 0x09, 0x58, 0xb0, 0x9b, 0x73, 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f1, 0xbf, 0x30, 0xe0, 0xda, 0x23,
0x4d, 0xd1, 0xff, 0x33, 0x8a, 0x7b, 0x23, 0x19, 0xeb, 0xc6, 0xe0, 0x5e, 0x04, 0x7f, 0xb1, 0xb9,
0x03, 0x3d, 0xba, 0x85, 0xb1, 0x58, 0xa3, 0x5b, 0x26, 0xfa, 0xb7, 0x4d, 0xcc, 0xb7, 0xbf, 0xde,
0x4c, 0xd8, 0xf7, 0x9b, 0x09, 0xfb, 0x71, 0x33, 0x61, 0x1f, 0x7f, 0x4d, 0xee, 0x9d, 0xf5, 0xe8,
0x4f, 0xe4, 0xe9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x3e, 0xba, 0x23, 0x54, 0x06, 0x00,
0x00,
// 707 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0xd3, 0x4a,
0x14, 0xbe, 0x13, 0x3b, 0x7f, 0x27, 0x49, 0x55, 0x8d, 0xee, 0xed, 0xb5, 0xae, 0xae, 0x82, 0x65,
0xb1, 0xf0, 0x2a, 0x95, 0xc2, 0x1e, 0x44, 0xfa, 0x23, 0x45, 0x15, 0x15, 0x4c, 0x4a, 0x59, 0xbb,
0xed, 0xa8, 0x58, 0x72, 0x3c, 0xc6, 0x1e, 0x2b, 0xcd, 0x73, 0xb0, 0xe1, 0x11, 0x78, 0x08, 0x16,
0x88, 0x15, 0x4b, 0x1e, 0x01, 0xca, 0x8b, 0xa0, 0x73, 0xc6, 0x13, 0x3b, 0xad, 0x04, 0x2c, 0xd8,
0xcd, 0xf7, 0x7d, 0x33, 0xc7, 0xf3, 0xcd, 0xf9, 0x4e, 0x02, 0xc3, 0xac, 0xbc, 0x48, 0xe2, 0xcb,
0x49, 0x96, 0x2b, 0xad, 0x78, 0x2f, 0x4e, 0xb5, 0xcc, 0xd3, 0x28, 0x09, 0x16, 0xe0, 0x08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, 0x62, 0x85, 0xee, 0x98, 0xe8, 0xde, 0x35, 0x31, 0xdb,
0xfd, 0x7c, 0x3b, 0x66, 0x5f, 0x6e, 0xc7, 0xec, 0xeb, 0xed, 0x98, 0xbd, 0xfb, 0x3e, 0xfe, 0xeb,
0xa2, 0x43, 0x7f, 0x1c, 0x8f, 0x7e, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x35, 0x66, 0x28, 0x48,
0x06, 0x00, 0x00,
}

View file

@ -2,7 +2,7 @@ syntax = "proto3";
package internal;
message Bitmap {
message Row {
repeated uint64 Bits = 1;
repeated string Keys = 3;
repeated Attr Attrs = 2;
@ -61,7 +61,7 @@ message QueryResponse {
message QueryResult {
uint32 Type = 6;
Bitmap Bitmap = 1;
Row Row = 1;
uint64 N = 2;
repeated Pair Pairs = 3;
ValCount ValCount = 5;

10
row.go
View file

@ -260,20 +260,20 @@ func (r *Row) Bits() []uint64 {
return a
}
// encodeBitmap converts r into its internal representation.
func encodeBitmap(r *Row) *internal.Bitmap {
// encodeRow converts r into its internal representation.
func encodeRow(r *Row) *internal.Row {
if r == nil {
return nil
}
return &internal.Bitmap{
return &internal.Row{
Bits: r.Bits(),
Attrs: encodeAttrs(r.Attrs),
}
}
// decodeBitmap converts r from its internal representation.
func decodeBitmap(pr *internal.Bitmap) *Row {
// decodeRow converts r from its internal representation.
func decodeRow(pr *internal.Row) *Row {
if pr == nil {
return nil
}