| 564 | } |
| 565 | |
| 566 | func destUids(uidMatrix []*pb.List) *pb.List { |
| 567 | included := make(map[uint64]struct{}) |
| 568 | for _, ul := range uidMatrix { |
| 569 | for _, uid := range ul.Uids { |
| 570 | included[uid] = struct{}{} |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | res := &pb.List{Uids: make([]uint64, 0, len(included))} |
| 575 | for uid := range included { |
| 576 | res.Uids = append(res.Uids, uid) |
| 577 | } |
| 578 | sort.Slice(res.Uids, func(i, j int) bool { return res.Uids[i] < res.Uids[j] }) |
| 579 | return res |
| 580 | } |
| 581 | |
| 582 | func fetchValues(ctx context.Context, in *pb.Query, idx int, or chan orderResult) { |
| 583 | var err error |