func NodeToExpr(node *Node) (influxql.Expr, error) {
	var v nodeToExprVisitor
	WalkNode(&v, node)
	if err := v.Err(); err != nil {
		return nil, err
	}
	if len(v.exprs) > 1 {
		return nil, errors.New("invalid expression")
	}
	if len(v.exprs) == 0 {
		return nil, nil
	}
	return v.exprs[0], nil
}
NodeToExpr transforms a predicate node to an influxql.Expr.
package storage
import (
	"errors"
	"regexp"
	"github.com/influxdata/influxql"
)