func (ib *IsBinary) Eval(
	ctx *sql.Context,
	row sql.Row,
) (interface{}, error) {
	v, err := ib.Child.Eval(ctx, row)
	if err != nil {
		return nil, err
	}
	if v == nil {
		return false, nil
	}
	blob, err := sql.Blob.Convert(v)
	if err != nil {
		return nil, err
	}
	blobBytes := blob.([]byte)
	return isBinary(blobBytes), nil
}
Eval implements the Expression interface.
package function
import (
	"bytes"
	"fmt"
	"github.com/src-d/go-mysql-server/sql"
	"github.com/src-d/go-mysql-server/sql/expression"
)
type IsBinary struct {
	expression.UnaryExpression
}
func NewIsBinary(e sql.Expression) sql.Expression {
	return &IsBinary{expression.UnaryExpression{Child: e}}
}