// add GROUP expression
196149
func (o querySet) GroupBy(exprs ...string) QuerySeter {
	o.groups = exprs
	return &o
}
1285480
func (twg *TimeoutWaitGroup) Add(delta int) {
	twg.mutex.Lock()
	defer twg.mutex.Unlock()
	if twg.workers == 0 {
		// waitgroups are reusable once workers is 0
		twg.last = nil
	} else if twg.workers > 0 && twg.last != nil {
		// This mimics normal WG behavior. Cannot add after Wait() has been
		// called, unless workers is 0.  Prevents races on Wait()
		panic("TimeoutWaitGroup misuse: Add called concurrently with Wait")
	}
	twg.workers += delta
}
121159
func (g *Group) Go(fn func() error) {
	g.wg.Add(1)
	go func() {
		err := fn()
		if err != nil {
			g.mu.Lock()
			g.errs = append(g.errs, err)
			g.mu.Unlock()
		}
		g.wg.Done()
	}()
}
983307
func (g *BuilderGroup) Groups() []*BuilderGroup {
	groups := []*BuilderGroup{}
	for child, parent := range g.builder.ring.GroupToGroup {
		if parent == g.index {
			groups = append(groups, g.builder.groups[child])
		}
	}
	return groups
}
819710
func (g *group) Go(f func()) {
	g.wg.Add(1)
	go func() {
		defer g.wg.Done()
		f()
	}()
}
1350720
func (n *nessusImpl) CreateGroup(name string) (Group, error) {
	if n.verbose {
		log.Println("Creating a group...")
	}

	req := createGroupRequest{
		Name: name,
	}
	resp, err := n.doRequest("POST", "/groups", req, []int{http.StatusOK})
	if err != nil {
		return Group{}, err
	}
	defer resp.Body.Close()
	var reply Group
	if err = json.NewDecoder(resp.Body).Decode(&reply); err != nil {
		return Group{}, err
	}
	return reply, nil
}
659741
func (s *GroupService) Add(groupname string, username string) (*Group, *Response, error) {
	apiEndpoint := fmt.Sprintf("/rest/api/2/group/user?groupname=%s", groupname)
	var user struct {
		Name string `json:"name"`
	}
	user.Name = username
	req, err := s.client.NewRequest("POST", apiEndpoint, &user)
	if err != nil {
		return nil, nil, err
	}

	responseGroup := new(Group)
	resp, err := s.client.Do(req, responseGroup)
	if err != nil {
		jerr := NewJiraError(resp, err)
		return nil, resp, jerr
	}

	return responseGroup, resp, nil
}
914866
func (e *LoggingErrorGroup) Add(err error) {
	e.total++
	if err != nil {
		LogMethod("%s: %s", e.name, err)
		e.failed++
	}
}
1019834
func (a *aggPushDownSolver) addGbyCol(gbyCols []*expression.Column, cols ...*expression.Column) []*expression.Column {
	for _, c := range cols {
		duplicate := false
		for _, gbyCol := range gbyCols {
			if c.Equal(gbyCol, a.ctx) {
				duplicate = true
				break
			}
		}
		if !duplicate {
			gbyCols = append(gbyCols, c)
		}
	}
	return gbyCols
}
108674
func (elem GroupKindElement) GroupMatch(groups ...string) bool {
	for _, g := range groups {
		if elem.Group == g {
			return true
		}
	}
	return false
}
666422
func (m *Match) Groups() []Group {
	m.populateOtherGroups()
	g := make([]Group, len(m.otherGroups)+1)
	g[0] = m.Group
	copy(g[1:], m.otherGroups)
	return g
}
675617
func (b *batchAgg) Add(ev interface{}) {
	// from muster godoc: "The Batch does not need to be safe for concurrent
	// access; synchronization will be handled by the Client."
	if b.batches == nil {
		b.batches = map[string][]*Event{}
	}
	e := ev.(*Event)
	// collect separate buckets of events to send based on the trio of api/wk/ds
	// if all three of those match it's safe to send all the events in one batch
	key := fmt.Sprintf("%s_%s_%s", e.APIHost, e.APIKey, e.Dataset)
	b.batches[key] = append(b.batches[key], e)
}
553831
func (s *Scheduler) AddGroupedCallback(group string, db Collector) {
	s.callbackMutex.Lock()
	defer s.callbackMutex.Unlock()
	subgroup, exists := s.callbackMap[group]
	if !exists {
		subgroup = &callbackPair{
			callbacks:         map[Collector]struct{}{db: {}},
			defaultDimensions: map[string]string{},
		}
		s.callbackMap[group] = subgroup
	}
	subgroup.callbacks[db] = struct{}{}
}
773727
func AddCommand(groupName string, c Command) {
	for i, group := range commands {
		if group.Name == groupName {
			commands[i].Commands = append(commands[i].Commands, c)
			return
		}
	}
	panic(vterrors.Errorf(vtrpc.Code_INVALID_ARGUMENT, "trying to add to missing group %v", groupName))
}
56345
func (md *MulticastDispose) Add(f ...func()) {
	md.list = append(md.list, f...)
}
203380
func (wg *SafeWaitGroup) Add(delta int) error {
	wg.mu.RLock()
	defer wg.mu.RUnlock()
	if wg.wait && delta > 0 {
		return fmt.Errorf("add with positive delta after Wait is forbidden")
	}
	wg.wg.Add(delta)
	return nil
}
335242
func NewGroupExpr(node plannercore.LogicalPlan) *GroupExpr {
	return &GroupExpr{
		ExprNode: node,
		Children: nil,
		Explored: false,
	}
}