func (e *Not) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
	v, err := e.Child.Eval(ctx, row)
	if err != nil {
		return nil, err
	}
	if v == nil {
		return nil, nil
	}
	b, ok := v.(bool)
	if !ok {
		v, _ = e.Type().Convert(v)
		if v == nil {
			return nil, nil
		}
		if b, ok = v.(bool); !ok {
			return nil, sql.ErrInvalidType.New(reflect.TypeOf(v).String())
		}
	}
	return !b, nil
}
Eval implements the Expression interface.
package expression
import (
	"fmt"
	"reflect"
	"github.com/src-d/go-mysql-server/sql"
)
type Not struct {
	UnaryExpression
}
func NewNot(child sql.Expression) *Not {
	return &Not{UnaryExpression{child}}
}
func (e *Not) Type() sql.Type {
	return sql.Boolean
}