code: func (ls *LogicalSort) PruneColumns(parentUsedCols []*expression.Column) error {
  	child := ls.children[0]
  	for i := len(ls.ByItems) - 1; i >= 0; i-- {
  		cols := expression.ExtractColumns(ls.ByItems[i].Expr)
  		if len(cols) == 0 {
  			if !ls.ByItems[i].Expr.ConstItem() {
  				continue
  			}
  			ls.ByItems = append(ls.ByItems[:i], ls.ByItems[i+1:]...)
  		} else {
  			parentUsedCols = append(parentUsedCols, cols...)
  		}
  	}
  	return child.PruneColumns(parentUsedCols)
  }
docs: // PruneColumns implements LogicalPlan interface.