code: func (ff *firstRowFunction) Update(evalCtx *AggEvaluateContext, sc *stmtctx.StatementContext, row chunk.Row) error {
  	if evalCtx.GotFirstRow {
  		return nil
  	}
  	if len(ff.Args) != 1 {
  		return errors.New("Wrong number of args for AggFuncFirstRow")
  	}
  	value, err := ff.Args[0].Eval(row)
  	if err != nil {
  		return err
  	}
  	evalCtx.Value = types.CopyDatum(value)
  	evalCtx.GotFirstRow = true
  	return nil
  }
docs: // Update implements Aggregation interface.