code: func (p *LogicalJoin) pushDownTopNToChild(topN *LogicalTopN, idx int) LogicalPlan {
  	if topN == nil {
  		return p.children[idx].pushDownTopN(nil)
  	}
  
  	for _, by := range topN.ByItems {
  		cols := expression.ExtractColumns(by.Expr)
  		for _, col := range cols {
  			if p.children[1-idx].Schema().Contains(col) {
  				return p.children[idx].pushDownTopN(nil)
  			}
  		}
  	}
  
  	newTopN := LogicalTopN{
  		Count:   topN.Count + topN.Offset,
  		ByItems: make([]*ByItems, len(topN.ByItems)),
  	}.Init(topN.ctx)
  	for i := range topN.ByItems {
  		newTopN.ByItems[i] = topN.ByItems[i].Clone()
  	}
  	return p.children[idx].pushDownTopN(newTopN)
  }
docs: // pushDownTopNToChild will push a topN to one child of join. The idx stands for join child index. 0 is for left child.