func InspectExpressions(node sql.Node, f func(sql.Expression) bool) {
	WalkExpressions(exprInspector(f), node)
}
InspectExpressions traverses the plan and calls expression.Inspect on any
expression it finds.
package plan
import (
	"github.com/src-d/go-mysql-server/sql"
	"github.com/src-d/go-mysql-server/sql/expression"
)
type Visitor interface {
	Visit(node sql.Node) Visitor
}
func Walk(v Visitor, node sql.Node) {
	if v = v.Visit(node); v == nil {
		return
	}
	for _, child := range node.Children() {
		Walk(v, child)
	}
	v.Visit(nil)
}
type inspector func(sql.Node) bool
func (f inspector) Visit(node sql.Node) Visitor {
	if f(node) {
		return f
	}
	return nil
}
func Inspect(node sql.Node, f func(sql.Node) bool) {
	Walk(inspector(f), node)
}
func WalkExpressions(v expression.Visitor, node sql.Node) {
	Inspect(node, func(node sql.Node) bool {
		if n, ok := node.(sql.Expressioner); ok {
			for _, err := range n.Expressions() {
				expression.Walk(v, err)
			}
		}
		return true
	})
}