code: func (lt *LogicalTopN) setChild(p LogicalPlan) LogicalPlan {
  	// Remove this TopN if its child is a TableDual.
  	dual, isDual := p.(*LogicalTableDual)
  	if isDual {
  		numDualRows := uint64(dual.RowCount)
  		if numDualRows < lt.Offset {
  			dual.RowCount = 0
  			return dual
  		}
  		dual.RowCount = int(mathutil.MinUint64(numDualRows-lt.Offset, lt.Count))
  		return dual
  	}
  
  	if lt.isLimit() {
  		limit := LogicalLimit{
  			Count:  lt.Count,
  			Offset: lt.Offset,
  		}.Init(lt.ctx)
  		limit.SetChildren(p)
  		return limit
  	}
  	// Then lt must be topN.
  	lt.SetChildren(p)
  	return lt
  }
docs: // setChild set p as topn's child.