// GetPartialResult implements Aggregation interface.
330391
func (cf *concatFunction) GetPartialResult(evalCtx *AggEvaluateContext) []types.Datum {
	return []types.Datum{cf.GetResult(evalCtx)}
}
621133
func (r *LambdaResults) ResultsForRegion(region string) []AggData {
	lambdasOfRegion := make([]AggData, 0)
	for _, lambda := range r.Lambdas {
		if lambda.Region == region {
			lambdasOfRegion = append(lambdasOfRegion, lambda)
		}
	}
	return lambdasOfRegion
}
1014938
func (c *CodeSearchResult) GetIncompleteResults() bool {
	if c == nil || c.IncompleteResults == nil {
		return false
	}
	return *c.IncompleteResults
}
667248
func (r Network_Monitor_Version1_Query_Host) GetLastResult() (resp datatypes.Network_Monitor_Version1_Query_Result, err error) {
	err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "getLastResult", nil, &r.Options, &resp)
	return
}
773601
func (e *SelectStatement) AggregateResult(output Record) error {
	for i, expr := range e.selectAST.Expression.Expressions {
		v, err := expr.evalNode(nil)
		if err != nil {
			return err
		}
		output.Set(fmt.Sprintf("_%d", i+1), v)
	}
	return nil
}
307570
func WmStrutPartialGet(xu *xgbutil.XUtil,
	win xproto.Window) (*WmStrutPartial, error) {

	struts, err := xprop.PropValNums(xprop.GetProperty(xu, win,
		"_NET_WM_STRUT_PARTIAL"))
	if err != nil {
		return nil, err
	}

	return &WmStrutPartial{
		Left: struts[0], Right: struts[1], Top: struts[2], Bottom: struts[3],
		LeftStartY: struts[4], LeftEndY: struts[5],
		RightStartY: struts[6], RightEndY: struts[7],
		TopStartX: struts[8], TopEndX: struts[9],
		BottomStartX: struts[10], BottomEndX: struts[11],
	}, nil
}
1212762
func (sf *sumFunction) GetGroupResult(groupKey []byte) (d types.Datum) {
	return sf.getContext(groupKey).Value
}
352543
func (c *ClientupdateCountCall) EventResult(eventResult string) *ClientupdateCountCall {
	c.urlParams_.Set("eventResult", eventResult)
	return c
}
91229
func (af *avgFunction) GetResult(evalCtx *AggEvaluateContext) (d types.Datum) {
	switch evalCtx.Value.Kind() {
	case types.KindFloat64:
		sum := evalCtx.Value.GetFloat64()
		d.SetFloat64(sum / float64(evalCtx.Count))
		return
	case types.KindMysqlDecimal:
		x := evalCtx.Value.GetMysqlDecimal()
		y := types.NewDecFromInt(evalCtx.Count)
		to := new(types.MyDecimal)
		err := types.DecimalDiv(x, y, to, types.DivFracIncr)
		terror.Log(err)
		frac := af.RetTp.Decimal
		if frac == -1 {
			frac = mysql.MaxDecimalScale
		}
		err = to.Round(to, mathutil.Min(frac, mysql.MaxDecimalScale), types.ModeHalfEven)
		terror.Log(err)
		d.SetMysqlDecimal(to)
	}
	return
}
745108
func (iter *CommonIterator) nextResult(rType resultType) (commonledger.QueryResult, error) {
	if iter.currentLoc < len(iter.response.Results) {
		// On valid access of an element from cached results
		queryResult, err := iter.getResultFromBytes(iter.response.Results[iter.currentLoc], rType)
		if err != nil {
			chaincodeLogger.Errorf("Failed to decode query results: %+v", err)
			return nil, err
		}
		iter.currentLoc++

		if iter.currentLoc == len(iter.response.Results) && iter.response.HasMore {
			// On access of last item, pre-fetch to update HasMore flag
			if err = iter.fetchNextQueryResult(); err != nil {
				chaincodeLogger.Errorf("Failed to fetch next results: %+v", err)
				return nil, err
			}
		}

		return queryResult, err
	} else if !iter.response.HasMore {
		// On call to Next() without check of HasMore
		return nil, errors.New("no such key")
	}

	// should not fall through here
	// case: no cached results but HasMore is true.
	return nil, errors.New("invalid iterator state")
}
955449
func (cf *countFunction) GetResult(evalCtx *AggEvaluateContext) (d types.Datum) {
	d.SetInt64(evalCtx.Count)
	return d
}
1029796
func (d *domainClient) GetPartialAXTree(ctx context.Context, args *GetPartialAXTreeArgs) (reply *GetPartialAXTreeReply, err error) {
	reply = new(GetPartialAXTreeReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Accessibility.getPartialAXTree", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Accessibility.getPartialAXTree", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Accessibility", Op: "GetPartialAXTree", Err: err}
	}
	return
}
3219
func (cf *concatFunction) GetGroupResult(groupKey []byte) (d types.Datum) {
	ctx := cf.getContext(groupKey)
	if ctx.Buffer != nil {
		d.SetString(ctx.Buffer.String())
	} else {
		d.SetNull()
	}
	return d
}
48564
func AllowPartialResults() func(Call) error {
	return func(g Call) error {
		scan, ok := g.(*Scan)
		if !ok {
			return errors.New("'AllowPartialResults' option can only be used with Scan queries")
		}
		scan.allowPartialResults = true
		return nil
	}
}
879700
func (r Result) Get() (runtime.Object, error) {
	if r.err != nil {
		// Check whether the result has a Status object in the body and prefer that.
		return nil, r.Error()
	}
	if r.decoder == nil {
		return nil, fmt.Errorf("serializer for %s doesn't exist", r.contentType)
	}

	// decode, but if the result is Status return that as an error instead.
	out, _, err := r.decoder.Decode(r.body, nil, nil)
	if err != nil {
		return nil, err
	}
	switch t := out.(type) {
	case *metav1.Status:
		// any status besides StatusSuccess is considered an error.
		if t.Status != metav1.StatusSuccess {
			return nil, errors.FromObject(t)
		}
	}
	return out, nil
}
600400
func (a *AggregateResult) Reduction(result interface{}) {
	resultVal := reflect.ValueOf(result)

	if resultVal.Kind() != reflect.Ptr || resultVal.Elem().Kind() != reflect.Slice {
		panic("result argument must be a slice address")
	}

	sliceVal := resultVal.Elem()

	elType := sliceVal.Type().Elem()

	for i := range a.reduction {
		if elType.Kind() == reflect.Ptr {
			sliceVal = reflect.Append(sliceVal, a.reduction[i])
		} else {
			sliceVal = reflect.Append(sliceVal, a.reduction[i].Elem())
		}
	}

	resultVal.Elem().Set(sliceVal.Slice(0, sliceVal.Len()))
}
938477
func (c *Client) GetTaskResult(id int) []string {
	l, _ := c.GetTaskOutput(id, "result")
	return l
}