Changeset: de9481967a21 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=de9481967a21 Modified Files: monetdb5/modules/mal/batcalc.mal monetdb5/modules/mal/batcalc.mal.sh Branch: Jan2014 Log Message:
Generalize batcalc.between to non-numeric types. diffs (288 lines): diff --git a/monetdb5/modules/mal/batcalc.mal b/monetdb5/modules/mal/batcalc.mal --- a/monetdb5/modules/mal/batcalc.mal +++ b/monetdb5/modules/mal/batcalc.mal @@ -19671,228 +19671,28 @@ address CMDbatCMP comment "Return -1/0/1 if V </==/> B with candidates list"; -pattern between(b:bat[:oid,:bit],lo:bat[:oid,:bit],hi:bat[:oid,:bit]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:bat[:oid,:any_1],hi:bat[:oid,:any_1]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bit],lo:bat[:oid,:bit],hi:bat[:oid,:bit],s:bat[:oid,:oid]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:bat[:oid,:any_1],hi:bat[:oid,:any_1],s:bat[:oid,:oid]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bit],lo:bat[:oid,:bit],hi:bit) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:bat[:oid,:any_1],hi:any_1) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bit],lo:bat[:oid,:bit],hi:bit,s:bat[:oid,:oid]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:bat[:oid,:any_1],hi:any_1,s:bat[:oid,:oid]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bit],lo:bit,hi:bat[:oid,:bit]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:any_1,hi:bat[:oid,:any_1]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bit],lo:bit,hi:bat[:oid,:bit],s:bat[:oid,:oid]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:any_1,hi:bat[:oid,:any_1],s:bat[:oid,:oid]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bit],lo:bit,hi:bit) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:any_1,hi:any_1) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bit],lo:bit,hi:bit,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; - -pattern between(b:bat[:oid,:bte],lo:bat[:oid,:bte],hi:bat[:oid,:bte]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bte],lo:bat[:oid,:bte],hi:bat[:oid,:bte],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bte],lo:bat[:oid,:bte],hi:bte) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bte],lo:bat[:oid,:bte],hi:bte,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bte],lo:bte,hi:bat[:oid,:bte]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bte],lo:bte,hi:bat[:oid,:bte],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bte],lo:bte,hi:bte) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:bte],lo:bte,hi:bte,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; - -pattern between(b:bat[:oid,:sht],lo:bat[:oid,:sht],hi:bat[:oid,:sht]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:sht],lo:bat[:oid,:sht],hi:bat[:oid,:sht],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:sht],lo:bat[:oid,:sht],hi:sht) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:sht],lo:bat[:oid,:sht],hi:sht,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:sht],lo:sht,hi:bat[:oid,:sht]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:sht],lo:sht,hi:bat[:oid,:sht],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:sht],lo:sht,hi:sht) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:sht],lo:sht,hi:sht,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; - -pattern between(b:bat[:oid,:int],lo:bat[:oid,:int],hi:bat[:oid,:int]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:int],lo:bat[:oid,:int],hi:bat[:oid,:int],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:int],lo:bat[:oid,:int],hi:int) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:int],lo:bat[:oid,:int],hi:int,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:int],lo:int,hi:bat[:oid,:int]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:int],lo:int,hi:bat[:oid,:int],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:int],lo:int,hi:int) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:int],lo:int,hi:int,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; - -pattern between(b:bat[:oid,:wrd],lo:bat[:oid,:wrd],hi:bat[:oid,:wrd]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:wrd],lo:bat[:oid,:wrd],hi:bat[:oid,:wrd],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:wrd],lo:bat[:oid,:wrd],hi:wrd) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:wrd],lo:bat[:oid,:wrd],hi:wrd,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:wrd],lo:wrd,hi:bat[:oid,:wrd]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:wrd],lo:wrd,hi:bat[:oid,:wrd],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:wrd],lo:wrd,hi:wrd) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:wrd],lo:wrd,hi:wrd,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; - -pattern between(b:bat[:oid,:lng],lo:bat[:oid,:lng],hi:bat[:oid,:lng]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:lng],lo:bat[:oid,:lng],hi:bat[:oid,:lng],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:lng],lo:bat[:oid,:lng],hi:lng) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:lng],lo:bat[:oid,:lng],hi:lng,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:lng],lo:lng,hi:bat[:oid,:lng]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:lng],lo:lng,hi:bat[:oid,:lng],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:lng],lo:lng,hi:lng) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:lng],lo:lng,hi:lng,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; - -pattern between(b:bat[:oid,:flt],lo:bat[:oid,:flt],hi:bat[:oid,:flt]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:flt],lo:bat[:oid,:flt],hi:bat[:oid,:flt],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:flt],lo:bat[:oid,:flt],hi:flt) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:flt],lo:bat[:oid,:flt],hi:flt,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:flt],lo:flt,hi:bat[:oid,:flt]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:flt],lo:flt,hi:bat[:oid,:flt],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:flt],lo:flt,hi:flt) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:flt],lo:flt,hi:flt,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; - -pattern between(b:bat[:oid,:dbl],lo:bat[:oid,:dbl],hi:bat[:oid,:dbl]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:dbl],lo:bat[:oid,:dbl],hi:bat[:oid,:dbl],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:dbl],lo:bat[:oid,:dbl],hi:dbl) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:dbl],lo:bat[:oid,:dbl],hi:dbl,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:dbl],lo:dbl,hi:bat[:oid,:dbl]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:dbl],lo:dbl,hi:bat[:oid,:dbl],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:dbl],lo:dbl,hi:dbl) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:dbl],lo:dbl,hi:dbl,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; - -pattern between(b:bat[:oid,:oid],lo:bat[:oid,:oid],hi:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:oid],lo:bat[:oid,:oid],hi:bat[:oid,:oid],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:oid],lo:bat[:oid,:oid],hi:oid) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:oid],lo:bat[:oid,:oid],hi:oid,s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:oid],lo:oid,hi:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:oid],lo:oid,hi:bat[:oid,:oid],s:bat[:oid,:oid]) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:oid],lo:oid,hi:oid) :bat[:oid,:bit] -address CMDbatBETWEEN -comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:oid],lo:oid,hi:oid,s:bat[:oid,:oid]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:any_1,hi:any_1,s:bat[:oid,:oid]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; diff --git a/monetdb5/modules/mal/batcalc.mal.sh b/monetdb5/modules/mal/batcalc.mal.sh --- a/monetdb5/modules/mal/batcalc.mal.sh +++ b/monetdb5/modules/mal/batcalc.mal.sh @@ -527,35 +527,33 @@ EOF done echo -for tp in bit $numeric oid; do - cat <<EOF -pattern between(b:bat[:oid,:$tp],lo:bat[:oid,:$tp],hi:bat[:oid,:$tp]) :bat[:oid,:bit] +cat <<EOF +pattern between(b:bat[:oid,:any_1],lo:bat[:oid,:any_1],hi:bat[:oid,:any_1]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:$tp],lo:bat[:oid,:$tp],hi:bat[:oid,:$tp],s:bat[:oid,:oid]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:bat[:oid,:any_1],hi:bat[:oid,:any_1],s:bat[:oid,:oid]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:$tp],lo:bat[:oid,:$tp],hi:$tp) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:bat[:oid,:any_1],hi:any_1) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:$tp],lo:bat[:oid,:$tp],hi:$tp,s:bat[:oid,:oid]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:bat[:oid,:any_1],hi:any_1,s:bat[:oid,:oid]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:$tp],lo:$tp,hi:bat[:oid,:$tp]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:any_1,hi:bat[:oid,:any_1]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:$tp],lo:$tp,hi:bat[:oid,:$tp],s:bat[:oid,:oid]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:any_1,hi:bat[:oid,:any_1],s:bat[:oid,:oid]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:$tp],lo:$tp,hi:$tp) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:any_1,hi:any_1) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive, nil border is (minus) infinity"; -pattern between(b:bat[:oid,:$tp],lo:$tp,hi:$tp,s:bat[:oid,:oid]) :bat[:oid,:bit] +pattern between(b:bat[:oid,:any_1],lo:any_1,hi:any_1,s:bat[:oid,:oid]) :bat[:oid,:bit] address CMDbatBETWEEN comment "B between LO and HI inclusive with candidates list, nil border is (minus) infinity"; EOF -done echo for tp in $numeric; do _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list