code: func (p *PhysicalTopN) ToPB(ctx sessionctx.Context) (*tipb.Executor, error) {
  	sc := ctx.GetSessionVars().StmtCtx
  	client := ctx.GetClient()
  	topNExec := &tipb.TopN{
  		Limit: p.Count,
  	}
  	for _, item := range p.ByItems {
  		topNExec.OrderBy = append(topNExec.OrderBy, expression.SortByItemToPB(sc, client, item.Expr, item.Desc))
  	}
  	return &tipb.Executor{Tp: tipb.ExecType_TypeTopN, TopN: topNExec}, nil
  }
docs: // ToPB implements PhysicalPlan ToPB interface.