func CreateBitType(numOfBits uint8) (BitType, error) {
	if numOfBits < BitTypeMinBits || numOfBits > BitTypeMaxBits {
		return nil, fmt.Errorf("%v is an invalid number of bits", numOfBits)
	}
	return bitType{
		numOfBits: numOfBits,
	}, nil
}
CreateBitType creates a BitType.
package sql
import (
	"encoding/binary"
	"fmt"
	"strconv"
	"github.com/dolthub/vitess/go/sqltypes"
	"github.com/dolthub/vitess/go/vt/proto/query"
	"github.com/shopspring/decimal"
	"gopkg.in/src-d/go-errors.v1"
)
const (
	BitTypeMinBits = 1
	BitTypeMaxBits = 64
)
var (
	promotedBitType = MustCreateBitType(BitTypeMaxBits)
	errBeyondMaxBit = errors.NewKind("%v is beyond the maximum value that can be held by %v bits")
)
type BitType interface {
	Type
	NumberOfBits() uint8
}
type bitType struct {
	numOfBits uint8
}