@@ -33,6 +33,7 @@ import (
3333
3434// initBinaryEqual registers the functions to the catalog.
3535func initBinaryEqual () {
36+ framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , biteq )
3637 framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , booleq )
3738 framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , bpchareq )
3839 framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , byteaeq )
@@ -72,7 +73,7 @@ func initBinaryEqual() {
7273 framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , timestamptz_eq )
7374 framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , timetz_eq )
7475 framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , uuid_eq )
75- framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , varbit_eq )
76+ framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , varbiteq )
7677 framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , xideqint4 )
7778 framework .RegisterBinaryFunction (framework .Operator_BinaryEqual , xideq )
7879}
@@ -524,21 +525,36 @@ func record_eq_callable(ctx *sql.Context, _ [3]*pgtypes.DoltgresType, val1 any,
524525 return compare .CompareRecords (ctx , framework .Operator_BinaryEqual , val1 , val2 )
525526}
526527
527- // varbit_eq represents the PostgreSQL function of the same name, taking the same parameters.
528- var varbit_eq = framework.Function2 {
529- Name : "varbit_eq " ,
528+ // varbiteq represents the PostgreSQL function of the same name, taking the same parameters.
529+ var varbiteq = framework.Function2 {
530+ Name : "varbiteq " ,
530531 Return : pgtypes .Bool ,
531532 Parameters : [2 ]* pgtypes.DoltgresType {pgtypes .VarBit , pgtypes .VarBit },
532533 Strict : true ,
533534 Callable : varbit_eq_callable ,
534535}
535536
536- // varbit_eq_callable is the callable logic for the varbit_eq function.
537+ // biteq represents the PostgreSQL function of the same name, taking the same parameters.
538+ var biteq = framework.Function2 {
539+ Name : "biteq" ,
540+ Return : pgtypes .Bool ,
541+ Parameters : [2 ]* pgtypes.DoltgresType {pgtypes .Bit , pgtypes .Bit },
542+ Strict : true ,
543+ Callable : bit_eq_callable ,
544+ }
545+
546+ // varbit_eq_callable is the callable logic for the varbiteq function.
537547func varbit_eq_callable (ctx * sql.Context , _ [3 ]* pgtypes.DoltgresType , val1 any , val2 any ) (any , error ) {
538548 res , err := pgtypes .VarBit .Compare (ctx , val1 , val2 )
539549 return res == 0 , err
540550}
541551
552+ // bit_eq_callable is the callable logic for the varbiteq function.
553+ func bit_eq_callable (ctx * sql.Context , _ [3 ]* pgtypes.DoltgresType , val1 any , val2 any ) (any , error ) {
554+ res , err := pgtypes .Bit .Compare (ctx , val1 , val2 )
555+ return res == 0 , err
556+ }
557+
542558// record_eq represents the PostgreSQL function of the same name, taking the same parameters.
543559var record_eq = framework.Function2 {
544560 Name : "record_eq" ,
0 commit comments