change GroupByCounts to []GroupCount

This commit is contained in:
Travis Turner 2018-09-04 15:56:26 -05:00
parent b6d386ba53
commit f0666b2be0
No known key found for this signature in database
GPG key ID: 7F08008DFD9314C9
5 changed files with 136 additions and 136 deletions

View file

@ -363,9 +363,9 @@ func encodeQueryResponse(m *pilosa.QueryResponse) *internal.QueryResponse {
case pilosa.RowIDs:
pb.Results[i].Type = queryResultTypeRowIDs
pb.Results[i].RowIDs = result
case pilosa.GroupByCounts:
pb.Results[i].Type = queryResultTypeGroupByCounts
pb.Results[i].GroupByCounts = encodeGroupByCount(result)
case []pilosa.GroupCount:
pb.Results[i].Type = queryResultTypeGroupCounts
pb.Results[i].GroupCounts = encodeGroupCounts(result)
case nil:
pb.Results[i].Type = queryResultTypeNil
}
@ -929,7 +929,7 @@ const (
queryResultTypeUint64
queryResultTypeBool
queryResultTypeRowIDs
queryResultTypeGroupByCounts
queryResultTypeGroupCounts
)
func decodeQueryResult(pb *internal.QueryResult) interface{} {
@ -946,8 +946,8 @@ func decodeQueryResult(pb *internal.QueryResult) interface{} {
return pb.Changed
case queryResultTypeNil:
return nil
case queryResultTypeGroupByCounts:
return decodeGroupByCounts(pb.GroupByCounts)
case queryResultTypeGroupCounts:
return decodeGroupCounts(pb.GroupCounts)
}
panic(fmt.Sprintf("unknown type: %d", pb.Type))
}
@ -998,15 +998,15 @@ func decodeAttr(attr *internal.Attr) (key string, value interface{}) {
}
}
func decodeGroupByCounts(a []*internal.GroupLine) pilosa.GroupByCounts {
other := make([]pilosa.GroupLine, len(a))
func decodeGroupCounts(a []*internal.GroupCount) []pilosa.GroupCount {
other := make([]pilosa.GroupCount, len(a))
for i := range a {
other[i] = pilosa.GroupLine{
other[i] = pilosa.GroupCount{
decodeFieldRows(a[i].Group),
a[i].Count,
}
}
return pilosa.GroupByCounts(other)
return other
}
func decodeFieldRows(a []*internal.FieldRow) []pilosa.FieldRow {
@ -1069,10 +1069,10 @@ func encodeRow(r *pilosa.Row) *internal.Row {
}
}
func encodeGroupByCount(counts pilosa.GroupByCounts) []*internal.GroupLine {
result := make([]*internal.GroupLine, len(counts))
func encodeGroupCounts(counts []pilosa.GroupCount) []*internal.GroupCount {
result := make([]*internal.GroupCount, len(counts))
for i := range counts {
result[i] = &internal.GroupLine{
result[i] = &internal.GroupCount{
Group: encodeFieldRows(counts[i].Group),
Count: counts[i].Count,
}

View file

@ -751,22 +751,24 @@ func (r RowIDs) Merge(other RowIDs) RowIDs {
}
return result
}
func (e *executor) executeGroupBy(ctx context.Context, index string, c *pql.Call, shards []uint64, opt *execOptions) (GroupByCounts, error) {
func (e *executor) executeGroupBy(ctx context.Context, index string, c *pql.Call, shards []uint64, opt *execOptions) ([]GroupCount, error) {
// Execute calls in bulk on each remote node and merge.
mapFn := func(shard uint64) (interface{}, error) {
return e.executeGroupByShard(ctx, index, c, shard)
}
// Merge returned results at coordinating node.
reduceFn := func(prev, v interface{}) interface{} {
other, _ := prev.(GroupByCounts)
return other.Merge(v.(GroupByCounts))
other, _ := prev.([]GroupCount)
return mergeGroupCounts(other, v.([]GroupCount))
}
// Get full result set.
other, err := e.mapReduce(ctx, index, shards, c, opt, mapFn, reduceFn)
if err != nil {
return nil, err
}
results, _ := other.(GroupByCounts)
results, _ := other.([]GroupCount)
// Apply offset.
if offset, hasOffset, err := c.UintArg("offset"); err != nil {
return nil, err
@ -811,37 +813,35 @@ type gbi struct {
row *Row
fieldRow FieldRow
}
type GroupLine struct {
type GroupCount struct {
Group []FieldRow `json:"group"`
Count uint64 `json:"count"`
}
// GroupByCounts is the return type for GroupBy queries.
type GroupByCounts []GroupLine
func (gbc GroupByCounts) Merge(other GroupByCounts) GroupByCounts {
func mergeGroupCounts(gc, other []GroupCount) []GroupCount {
m := make(map[string]struct {
i int
count uint64
})
for i := range gbc {
m[uniqueGroupString(gbc[i].Group)] = struct {
for i := range gc {
m[uniqueGroupString(gc[i].Group)] = struct {
i int
count uint64
}{i, gbc[i].Count}
}{i, gc[i].Count}
}
for i := range other {
o, found := m[uniqueGroupString(other[i].Group)]
if found {
gbc[o.i].Count += other[i].Count
gc[o.i].Count += other[i].Count
} else {
gbc = append(gbc, other[i])
gc = append(gc, other[i])
}
}
return gbc
return gc
}
func (e *executor) executeGroupByShard(ctx context.Context, index string, c *pql.Call, shard uint64) (GroupByCounts, error) {
func (e *executor) executeGroupByShard(ctx context.Context, index string, c *pql.Call, shard uint64) ([]GroupCount, error) {
// Fetch index.
idx := e.Holder.Index(index)
if idx == nil {
@ -873,7 +873,8 @@ func (e *executor) executeGroupByShard(ctx context.Context, index string, c *pql
return nil, errors.Wrap(ErrFieldNotFound, fmt.Sprintf("executeGroupBy: %s", fieldDirective.(string)))
}
}
results := make(GroupByCounts, 0)
results := make([]GroupCount, 0)
var work [][]gbi
for _, fieldDirective := range fieldDirectives.([]interface{}) {
fieldName := getFieldName(fieldDirective.(string))
@ -901,9 +902,9 @@ func (e *executor) executeGroupByShard(ctx context.Context, index string, c *pql
work = append(work, set)
}
for _, group := range product(work) {
group.gl.Count = group.row.Count()
if group.gl.Count > 0 {
results = append(results, group.gl)
group.gCnt.Count = group.row.Count()
if group.gCnt.Count > 0 {
results = append(results, group.gCnt)
}
}
return results, nil
@ -911,8 +912,8 @@ func (e *executor) executeGroupByShard(ctx context.Context, index string, c *pql
// ppi is a product process item.
type ppi struct {
row *Row
gl GroupLine
row *Row
gCnt GroupCount
}
// product generates the cartesian product of the input
@ -920,7 +921,7 @@ type ppi struct {
func product(input [][]gbi) []ppi {
if len(input) == 0 { // base return empty list
return []ppi{
{gl: GroupLine{Group: make([]FieldRow, 0)}},
{gCnt: GroupCount{Group: make([]FieldRow, 0)}},
}
}
@ -929,9 +930,9 @@ func product(input [][]gbi) []ppi {
tail := product(input[1:]) // invoke product on remaining element
for h := range head { // for each head
for t := range tail { // iterate over the tail
s := ppi{gl: GroupLine{Group: make([]FieldRow, 0)}}
s.gl.Group = append([]FieldRow{head[h].fieldRow}, tail[t].gl.Group...) // had to insert at the front to match input order
if tail[t].row != nil { // first time around nothing to intersect
s := ppi{gCnt: GroupCount{Group: make([]FieldRow, 0)}}
s.gCnt.Group = append([]FieldRow{head[h].fieldRow}, tail[t].gCnt.Group...) // had to insert at the front to match input order
if tail[t].row != nil { // first time around nothing to intersect
s.row = head[h].row.Intersect(tail[t].row)
} else {
s.row = head[h].row
@ -2092,8 +2093,8 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res
}
}
case GroupByCounts:
other := make([]GroupLine, 0)
case []GroupCount:
other := make([]GroupCount, 0)
for _, gl := range result {
group := make([]FieldRow, len(gl.Group))
@ -2114,7 +2115,7 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res
}
}
other = append(other, GroupLine{
other = append(other, GroupCount{
Group: group,
Count: gl.Count,
})

View file

@ -1233,11 +1233,11 @@ Set(4500001, fn=4)
}); err != nil {
t.Fatalf("GroupBy querying: %v", err)
} else {
expected := pilosa.GroupByCounts{
expected := []pilosa.GroupCount{
{Group: []pilosa.FieldRow{{Field: "f", RowID: 10}}, Count: 4},
{Group: []pilosa.FieldRow{{Field: "f", RowID: 7}}, Count: 1},
}
results := res.Results[0].([]pilosa.GroupLine)
results := res.Results[0].([]pilosa.GroupCount)
checkGroupBy(t, expected, results)
}
})
@ -1712,7 +1712,7 @@ func TestExecutor_Execute_GroupBy(t *testing.T) {
}
})
t.Run("Basic", func(t *testing.T) {
expected := pilosa.GroupByCounts{
expected := []pilosa.GroupCount{
{Group: []pilosa.FieldRow{{Field: "general", RowID: 10}, {Field: "sub", RowID: 110}}, Count: 1},
{Group: []pilosa.FieldRow{{Field: "general", RowID: 11}, {Field: "sub", RowID: 110}}, Count: 1},
{Group: []pilosa.FieldRow{{Field: "general", RowID: 12}, {Field: "sub", RowID: 110}}, Count: 1},
@ -1722,13 +1722,13 @@ func TestExecutor_Execute_GroupBy(t *testing.T) {
if res, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `GroupBy(fields=[general,sub])`}); err != nil {
t.Fatal(err)
} else {
results := res.Results[0].([]pilosa.GroupLine)
results := res.Results[0].([]pilosa.GroupCount)
checkGroupBy(t, expected, results)
}
})
t.Run("check field offset no limit", func(t *testing.T) {
expected := pilosa.GroupByCounts{
expected := []pilosa.GroupCount{
{Group: []pilosa.FieldRow{{Field: "general", RowID: 11}}, Count: 2},
{Group: []pilosa.FieldRow{{Field: "general", RowID: 12}}, Count: 2},
}
@ -1736,27 +1736,27 @@ func TestExecutor_Execute_GroupBy(t *testing.T) {
if res, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `GroupBy(fields=[general:11:])`}); err != nil {
t.Fatal(err)
} else {
results := res.Results[0].([]pilosa.GroupLine)
results := res.Results[0].([]pilosa.GroupCount)
checkGroupBy(t, expected, results)
}
})
t.Run("check field offset limit", func(t *testing.T) {
expected := pilosa.GroupByCounts{
expected := []pilosa.GroupCount{
{Group: []pilosa.FieldRow{{Field: "general", RowID: 11}}, Count: 2},
}
if res, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `GroupBy(fields=[general:11:1])`}); err != nil {
t.Fatal(err)
} else {
results := res.Results[0].([]pilosa.GroupLine)
results := res.Results[0].([]pilosa.GroupCount)
checkGroupBy(t, expected, results)
}
})
}
func checkGroupBy(t *testing.T, expected, results pilosa.GroupByCounts) {
notIn := func(item pilosa.GroupLine, expected pilosa.GroupByCounts) bool {
func checkGroupBy(t *testing.T, expected, results []pilosa.GroupCount) {
notIn := func(item pilosa.GroupCount, expected []pilosa.GroupCount) bool {
for i := range expected {
if item.Count == expected[i].Count {
if reflect.DeepEqual(item.Group, expected[i].Group) {

View file

@ -11,7 +11,7 @@
Row
Pair
FieldRow
GroupLine
GroupCount
ValCount
Bit
ColumnAttrSet
@ -132,24 +132,24 @@ func (m *FieldRow) GetRowID() uint64 {
return 0
}
type GroupLine struct {
type GroupCount struct {
Group []*FieldRow `protobuf:"bytes,1,rep,name=Group" json:"Group,omitempty"`
Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"`
}
func (m *GroupLine) Reset() { *m = GroupLine{} }
func (m *GroupLine) String() string { return proto.CompactTextString(m) }
func (*GroupLine) ProtoMessage() {}
func (*GroupLine) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{3} }
func (m *GroupCount) Reset() { *m = GroupCount{} }
func (m *GroupCount) String() string { return proto.CompactTextString(m) }
func (*GroupCount) ProtoMessage() {}
func (*GroupCount) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{3} }
func (m *GroupLine) GetGroup() []*FieldRow {
func (m *GroupCount) GetGroup() []*FieldRow {
if m != nil {
return m.Group
}
return nil
}
func (m *GroupLine) GetCount() uint64 {
func (m *GroupCount) GetCount() uint64 {
if m != nil {
return m.Count
}
@ -405,14 +405,14 @@ func (m *QueryResponse) GetColumnAttrSets() []*ColumnAttrSet {
}
type QueryResult struct {
Type uint32 `protobuf:"varint,6,opt,name=Type,proto3" json:"Type,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"`
Changed bool `protobuf:"varint,4,opt,name=Changed,proto3" json:"Changed,omitempty"`
ValCount *ValCount `protobuf:"bytes,5,opt,name=ValCount" json:"ValCount,omitempty"`
RowIDs []uint64 `protobuf:"varint,7,rep,packed,name=RowIDs" json:"RowIDs,omitempty"`
GroupByCounts []*GroupLine `protobuf:"bytes,8,rep,name=GroupByCounts" json:"GroupByCounts,omitempty"`
Type uint32 `protobuf:"varint,6,opt,name=Type,proto3" json:"Type,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"`
Changed bool `protobuf:"varint,4,opt,name=Changed,proto3" json:"Changed,omitempty"`
ValCount *ValCount `protobuf:"bytes,5,opt,name=ValCount" json:"ValCount,omitempty"`
RowIDs []uint64 `protobuf:"varint,7,rep,packed,name=RowIDs" json:"RowIDs,omitempty"`
GroupCounts []*GroupCount `protobuf:"bytes,8,rep,name=GroupCounts" json:"GroupCounts,omitempty"`
}
func (m *QueryResult) Reset() { *m = QueryResult{} }
@ -469,9 +469,9 @@ func (m *QueryResult) GetRowIDs() []uint64 {
return nil
}
func (m *QueryResult) GetGroupByCounts() []*GroupLine {
func (m *QueryResult) GetGroupCounts() []*GroupCount {
if m != nil {
return m.GroupByCounts
return m.GroupCounts
}
return nil
}
@ -608,7 +608,7 @@ func init() {
proto.RegisterType((*Row)(nil), "internal.Row")
proto.RegisterType((*Pair)(nil), "internal.Pair")
proto.RegisterType((*FieldRow)(nil), "internal.FieldRow")
proto.RegisterType((*GroupLine)(nil), "internal.GroupLine")
proto.RegisterType((*GroupCount)(nil), "internal.GroupCount")
proto.RegisterType((*ValCount)(nil), "internal.ValCount")
proto.RegisterType((*Bit)(nil), "internal.Bit")
proto.RegisterType((*ColumnAttrSet)(nil), "internal.ColumnAttrSet")
@ -745,7 +745,7 @@ func (m *FieldRow) MarshalTo(dAtA []byte) (int, error) {
return i, nil
}
func (m *GroupLine) Marshal() (dAtA []byte, err error) {
func (m *GroupCount) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
@ -755,7 +755,7 @@ func (m *GroupLine) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *GroupLine) MarshalTo(dAtA []byte) (int, error) {
func (m *GroupCount) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
@ -1181,8 +1181,8 @@ func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintPublic(dAtA, i, uint64(j7))
i += copy(dAtA[i:], dAtA8[:j7])
}
if len(m.GroupByCounts) > 0 {
for _, msg := range m.GroupByCounts {
if len(m.GroupCounts) > 0 {
for _, msg := range m.GroupCounts {
dAtA[i] = 0x42
i++
i = encodeVarintPublic(dAtA, i, uint64(msg.Size()))
@ -1461,7 +1461,7 @@ func (m *FieldRow) Size() (n int) {
return n
}
func (m *GroupLine) Size() (n int) {
func (m *GroupCount) Size() (n int) {
var l int
_ = l
if len(m.Group) > 0 {
@ -1644,8 +1644,8 @@ func (m *QueryResult) Size() (n int) {
}
n += 1 + sovPublic(uint64(l)) + l
}
if len(m.GroupByCounts) > 0 {
for _, e := range m.GroupByCounts {
if len(m.GroupCounts) > 0 {
for _, e := range m.GroupCounts {
l = e.Size()
n += 1 + l + sovPublic(uint64(l))
}
@ -2140,7 +2140,7 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *GroupLine) Unmarshal(dAtA []byte) error {
func (m *GroupCount) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@ -2163,10 +2163,10 @@ func (m *GroupLine) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: GroupLine: wiretype end group for non-group")
return fmt.Errorf("proto: GroupCount: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GroupLine: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: GroupCount: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -3432,7 +3432,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error {
}
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GroupByCounts", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field GroupCounts", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@ -3456,8 +3456,8 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.GroupByCounts = append(m.GroupByCounts, &GroupLine{})
if err := m.GroupByCounts[len(m.GroupByCounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
m.GroupCounts = append(m.GroupCounts, &GroupCount{})
if err := m.GroupCounts[len(m.GroupCounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@ -4241,54 +4241,53 @@ var (
func init() { proto.RegisterFile("public.proto", fileDescriptorPublic) }
var fileDescriptorPublic = []byte{
// 771 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6e, 0xd3, 0x4c,
0x14, 0xfe, 0x27, 0x76, 0x12, 0xe7, 0xa4, 0xc9, 0x5f, 0x0d, 0xa5, 0x58, 0xa8, 0x0a, 0x96, 0x85,
0x90, 0x57, 0xa9, 0x14, 0x24, 0x24, 0x36, 0x20, 0xd2, 0x0b, 0x8a, 0x0a, 0x15, 0x4c, 0x4b, 0x11,
0x4b, 0xb7, 0x19, 0xb5, 0x96, 0x1c, 0x8f, 0xf1, 0x45, 0x69, 0x9e, 0xa3, 0x1b, 0x1e, 0x81, 0x05,
0x0f, 0xd2, 0x25, 0x8f, 0x00, 0xe5, 0x45, 0xd0, 0x9c, 0xf1, 0xd8, 0x4e, 0x8a, 0x2a, 0x16, 0xec,
0xe6, 0xfb, 0xce, 0x9c, 0xf1, 0x77, 0xae, 0x86, 0xb5, 0x38, 0x3f, 0x0d, 0x83, 0xb3, 0x61, 0x9c,
0x88, 0x4c, 0x50, 0x2b, 0x88, 0x32, 0x9e, 0x44, 0x7e, 0xe8, 0x7e, 0x02, 0x83, 0x89, 0x39, 0xb5,
0xa1, 0xbd, 0x23, 0xc2, 0x7c, 0x16, 0xa5, 0x36, 0x71, 0x0c, 0xcf, 0x64, 0x1a, 0xd2, 0xc7, 0xd0,
0x7c, 0x95, 0x65, 0x49, 0x6a, 0x37, 0x1c, 0xc3, 0xeb, 0x8e, 0xfa, 0x43, 0x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c, 0xdb, 0xb8, 0xbc, 0x35, 0x94, 0x9e, 0xea, 0x19,
0x34, 0x5a, 0x68, 0xac, 0x31, 0xee, 0x37, 0x02, 0x54, 0xc5, 0x88, 0xb3, 0xf9, 0xef, 0x02, 0xbd,
0x3b, 0xa0, 0x4d, 0x68, 0xe1, 0xf7, 0x74, 0x30, 0x05, 0x5a, 0x91, 0xdb, 0x5e, 0x95, 0x3b, 0x5e,
0xbf, 0xbe, 0x19, 0x90, 0xef, 0x37, 0x03, 0xf2, 0xe3, 0x66, 0x40, 0xbe, 0xfc, 0x1a, 0xfc, 0x77,
0xda, 0xc2, 0x9f, 0xe1, 0xd3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x21, 0xc1, 0x72, 0xc6, 0x1c,
0x07, 0x00, 0x00,
// 764 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, 0x89, 0x73, 0xd2, 0xe4, 0x56, 0xa3, 0xde, 0x5e, 0x0b, 0x55, 0xc1, 0xb2,
0x10, 0xf2, 0x2a, 0x95, 0x82, 0xd4, 0x25, 0x88, 0xfe, 0xa1, 0xa8, 0x50, 0xc1, 0xb4, 0x14, 0xb1,
0x74, 0x9b, 0x51, 0x6b, 0xc9, 0xf1, 0x18, 0xff, 0x28, 0xcd, 0x5b, 0x20, 0xb1, 0xe1, 0x11, 0x58,
0xf0, 0x20, 0x5d, 0xf2, 0x08, 0x50, 0x5e, 0x04, 0xcd, 0x19, 0x4f, 0xc6, 0x49, 0x51, 0xc5, 0x82,
0x9d, 0xbf, 0xef, 0xcc, 0x39, 0xf9, 0xce, 0x6f, 0x60, 0x2d, 0x2d, 0xcf, 0xe3, 0xe8, 0x62, 0x98,
0x66, 0xa2, 0x10, 0xd4, 0x89, 0x92, 0x82, 0x67, 0x49, 0x18, 0xfb, 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b4, 0x97, 0x34, 0x6e, 0x41, 0x47, 0x9f, 0x8f, 0xdc, 0x6d, 0xa2, 0xc9, 0x10,
0x72, 0x9d, 0x16, 0xf7, 0x43, 0xce, 0x9f, 0x15, 0x58, 0xac, 0xc6, 0xc8, 0xba, 0x32, 0x31, 0xc3,
0xd3, 0xdd, 0xc6, 0xd3, 0xad, 0xa1, 0xf4, 0x54, 0x61, 0xd0, 0xe8, 0xa0, 0xb1, 0xc6, 0xf8, 0x5f,
0x09, 0x50, 0x95, 0x23, 0x2e, 0xe6, 0xdf, 0x4b, 0xf4, 0xfe, 0x84, 0x36, 0xa1, 0x85, 0xbf, 0xa7,
0x93, 0xa9, 0xd0, 0x8a, 0xdc, 0xf6, 0xaa, 0xdc, 0xdd, 0xf5, 0x9b, 0xdb, 0x01, 0xf9, 0x76, 0x3b,
0x20, 0xdf, 0x6f, 0x07, 0xe4, 0xf3, 0xcf, 0xc1, 0x3f, 0xe7, 0x2d, 0xfc, 0x2b, 0x7c, 0xf2, 0x2b,
0x00, 0x00, 0xff, 0xff, 0x25, 0x1f, 0x0d, 0xa8, 0x1a, 0x07, 0x00, 0x00,
}

View file

@ -19,7 +19,7 @@ message FieldRow{
uint64 RowID = 2;
}
message GroupLine{
message GroupCount{
repeated FieldRow Group = 1;
uint64 Count = 2;
}
@ -77,7 +77,7 @@ message QueryResult {
bool Changed = 4;
ValCount ValCount = 5;
repeated uint64 RowIDs = 7;
repeated GroupLine GroupByCounts = 8;
repeated GroupCount GroupCounts = 8;
}
message ImportRequest {