code: func enforceProperty(prop *requiredProperty, info *physicalPlanInfo) *physicalPlanInfo {
  	if info.p == nil {
  		return info
  	}
  	if len(prop.props) != 0 {
  		items := make([]*ByItems, 0, len(prop.props))
  		for _, col := range prop.props {
  			items = append(items, &ByItems{Expr: col.col, Desc: col.desc})
  		}
  		sort := &Sort{
  			ByItems:   items,
  			ExecLimit: prop.limit,
  		}
  		sort.SetSchema(info.p.GetSchema())
  		info = addPlanToResponse(sort, info)
  		count := info.count
  		if prop.limit != nil {
  			count = prop.limit.Offset + prop.limit.Count
  		}
  		info.cost += sortCost(count)
  	} else if prop.limit != nil {
  		limit := prop.limit.Copy().(*Limit)
  		limit.SetSchema(info.p.GetSchema())
  		info = addPlanToResponse(limit, info)
  	}
  	if prop.limit != nil && prop.limit.Count < info.count {
  		info.count = prop.limit.Count
  	}
  	return info
  }
docs: // enforceProperty creates a *physicalPlanInfo that satisfies the required property by adding
  // sort or limit as the parent of the given physical plan.