func ExplainColumnList(cols []*Column) []byte {
	buffer := bytes.NewBufferString("")
	for i, col := range cols {
		buffer.WriteString(col.ExplainInfo())
		if i+1 < len(cols) {
			buffer.WriteString(", ")
		}
	}
	return buffer.Bytes()
}
ExplainColumnList generates explain information for a list of columns.
package expression
import (
	"bytes"
	"fmt"
	"sort"
	"strings"
	"github.com/pingcap/tidb/types"
	"github.com/pingcap/tidb/util/chunk"
)
func (expr *ScalarFunction) ExplainInfo() string {
	return expr.explainInfo(false)
}
func (expr *ScalarFunction) explainInfo(normalized bool) string {
	var buffer bytes.Buffer
	fmt.Fprintf(&buffer, "%s(", expr.FuncName.L)
	for i, arg := range expr.GetArgs() {
		if normalized {
			buffer.WriteString(arg.ExplainNormalizedInfo())
		} else {
			buffer.WriteString(arg.ExplainInfo())
		}
		if i+1 < len(expr.GetArgs()) {
			buffer.WriteString(", ")
		}
	}
	buffer.WriteString(")")
	return buffer.String()
}
func (expr *ScalarFunction) ExplainNormalizedInfo() string {
	return expr.explainInfo(true)
}
func (col *Column) ExplainInfo() string {
	return col.String()
}
func (col *Column) ExplainNormalizedInfo() string {
	return col.ExplainInfo()
}
func (expr *Constant) ExplainInfo() string {
	dt, err := expr.Eval(chunk.Row{})
	if err != nil {
		return "not recognized const vanue"
	}
	return expr.format(dt)
}
func (expr *Constant) ExplainNormalizedInfo() string {
	return "?"
}
func (expr *Constant) format(dt types.Datum) string {
	switch dt.Kind() {
	case types.KindNull:
		return "NULL"
	case types.KindString, types.KindBytes, types.KindMysqlEnum, types.KindMysqlSet,
		types.KindMysqlJSON, types.KindBinaryLiteral, types.KindMysqlBit:
		return fmt.Sprintf("\"%v\"", dt.GetValue())
	}
	return fmt.Sprintf("%v", dt.GetValue())
}
func ExplainExpressionList(exprs []Expression, schema *Schema) string {
	builder := &strings.Builder{}
	for i, expr := range exprs {
		switch expr.(type) {
		case *Column, *CorrelatedColumn:
			builder.WriteString(expr.String())
		default:
			fmt.Fprintf(builder, "%v->%v", expr.String(), schema.Columns[i])
		}
		if i+1 < len(exprs) {
			builder.WriteString(", ")
		}
	}
	return builder.String()
}
func SortedExplainExpressionList(exprs []Expression) []byte {
	return sortedExplainExpressionList(exprs, false)
}
func sortedExplainExpressionList(exprs []Expression, normalized bool) []byte {
	buffer := bytes.NewBufferString("")
	exprInfos := make([]string, 0, len(exprs))
	for _, expr := range exprs {
		if normalized {
			exprInfos = append(exprInfos, expr.ExplainNormalizedInfo())
		} else {
			exprInfos = append(exprInfos, expr.ExplainInfo())
		}
	}
	sort.Strings(exprInfos)
	for i, info := range exprInfos {
		buffer.WriteString(info)
		if i+1 < len(exprInfos) {
			buffer.WriteString(", ")
		}
	}
	return buffer.Bytes()
}
func SortedExplainNormalizedExpressionList(exprs []Expression) []byte {
	return sortedExplainExpressionList(exprs, true)
}
func SortedExplainNormalizedScalarFuncList(exprs []*ScalarFunction) []byte {
	expressions := make([]Expression, len(exprs))
	for i := range exprs {
		expressions[i] = exprs[i]
	}
	return sortedExplainExpressionList(expressions, true)
}