func (o *Or) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
	lval, err := o.Left.Eval(ctx, row)
	if err != nil {
		return nil, err
	}
	if lval == true {
		return true, nil
	}
	rval, err := o.Right.Eval(ctx, row)
	if err != nil {
		return nil, err
	}
	if lval == nil && rval == nil {
		return nil, nil
	}
	return rval == true, nil
}
Eval implements the Expression interface.
package expression
import (
	"fmt"
	"github.com/src-d/go-mysql-server/sql"
)
type And struct {
	BinaryExpression
}
func NewAnd(left, right sql.Expression) sql.Expression {
	return &And{BinaryExpression{Left: left, Right: right}}
}
func JoinAnd(exprs ...sql.Expression) sql.Expression {
	switch len(exprs) {
	case 0:
		return nil
	case 1:
		return exprs[0]
	default:
		result := NewAnd(exprs[0], exprs[1])
		for _, e := range exprs[2:] {
			result = NewAnd(result, e)
		}
		return result
	}
}
func (a *And) String() string {
	return fmt.Sprintf("%s AND %s", a.Left, a.Right)
}
func (*And) Type() sql.Type {
	return sql.Boolean
}
func (a *And) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
	lval, err := a.Left.Eval(ctx, row)
	if err != nil {
		return nil, err
	}
	if lval == false {
		return false, nil
	}
	rval, err := a.Right.Eval(ctx, row)
	if err != nil {
		return nil, err
	}
	if rval == false {
		return false, nil
	}
	if lval == nil || rval == nil {
		return nil, nil
	}
	return true, nil
}
func (a *And) WithChildren(children ...sql.Expression) (sql.Expression, error) {
	if len(children) != 2 {
		return nil, sql.ErrInvalidChildrenNumber.New(a, len(children), 2)
	}
	return NewAnd(children[0], children[1]), nil
}
type Or struct {
	BinaryExpression
}
func NewOr(left, right sql.Expression) sql.Expression {
	return &Or{BinaryExpression{Left: left, Right: right}}
}
func (o *Or) String() string {
	return fmt.Sprintf("%s OR %s", o.Left, o.Right)
}
func (*Or) Type() sql.Type {
	return sql.Boolean
}