Changeset: f5c0fa51cc56 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f5c0fa51cc56
Modified Files:
clients/Tests/MAL-signatures_all.stable.out
clients/Tests/MAL-signatures_all.stable.out.int128
clients/Tests/MAL-signatures_fits_geom.stable.out
clients/Tests/MAL-signatures_fits_geom.stable.out.int128
clients/Tests/MAL-signatures_geom.stable.out
clients/Tests/MAL-signatures_geom.stable.out.int128
clients/Tests/MAL-signatures_none.stable.out
clients/Tests/MAL-signatures_none.stable.out.int128
clients/Tests/exports.stable.out
gdk/gdk_calc.c
gdk/gdk_calc.h
monetdb5/ChangeLog
monetdb5/modules/atoms/mtime.mal
monetdb5/modules/atoms/str.c
monetdb5/modules/atoms/str.h
monetdb5/modules/atoms/str.mal
monetdb5/modules/mal/00_calc_hge.mal
monetdb5/modules/mal/00_calc_hge.mal.sh
monetdb5/modules/mal/01_batcalc.mal
monetdb5/modules/mal/01_batcalc.mal.sh
monetdb5/modules/mal/01_calc.mal
monetdb5/modules/mal/01_calc.mal.sh
monetdb5/modules/mal/batcalc.c
monetdb5/modules/mal/calc.c
Branch: default
Log Message:
Implemented batcalc.min(_no_nil) and batcalc.max(_no_nil).
Also made calc.min(_no_nil) and calc.max(_no_nil) generic (using "any"
type) and removed specific implementation for all non-any types.
diffs (truncated from 3241 to 300 lines):
diff --git a/clients/Tests/MAL-signatures_all.stable.out
b/clients/Tests/MAL-signatures_all.stable.out
--- a/clients/Tests/MAL-signatures_all.stable.out
+++ b/clients/Tests/MAL-signatures_all.stable.out
@@ -28077,6 +28077,38 @@ pattern batcalc.mul_noerror(b1:bat[:oid,
address CMDbatMUL;
comment Return B1 * B2, overflow causes NIL value
+pattern
batcalc.max_no_nil(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1],s:bat[:oid,:oid]):bat[:oid,:any_1]
+address CMDbatMAX_no_nil;
+comment Return bat with maximum value of each pair of inputs, ignoring nil
values
+
+pattern
batcalc.max_no_nil(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1]):bat[:oid,:any_1]
+address CMDbatMAX_no_nil;
+comment Return bat with maximum value of each pair of inputs, ignoring nil
values
+
+pattern
batcalc.max(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1],s:bat[:oid,:oid]):bat[:oid,:any_1]
+address CMDbatMAX;
+comment Return bat with maximum value of each pair of inputs
+
+pattern batcalc.max(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1]):bat[:oid,:any_1]
+address CMDbatMAX;
+comment Return bat with maximum value of each pair of inputs
+
+pattern
batcalc.min_no_nil(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1],s:bat[:oid,:oid]):bat[:oid,:any_1]
+address CMDbatMIN_no_nil;
+comment Return bat with minimum value of each pair of inputs, ignoring nil
values
+
+pattern
batcalc.min_no_nil(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1]):bat[:oid,:any_1]
+address CMDbatMIN_no_nil;
+comment Return bat with minimum value of each pair of inputs, ignoring nil
values
+
+pattern
batcalc.min(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1],s:bat[:oid,:oid]):bat[:oid,:any_1]
+address CMDbatMIN;
+comment Return bat with minimum value of each pair of inputs
+
+pattern batcalc.min(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1]):bat[:oid,:any_1]
+address CMDbatMIN;
+comment Return bat with minimum value of each pair of inputs
+
pattern batcalc.not(b:bat[:oid,:lng],s:bat[:oid,:oid]):bat[:oid,:lng]
address CMDbatNOT;
comment Unary bitwise not over the tail of the bat with candidates list
@@ -36265,150 +36297,22 @@ command calc.mbr(v:mbr):mbr
address mbrFromMBR;
command calc.mbr{unsafe}(v:str):mbr
address mbrFromString;
-pattern calc.max_no_nil(v1:oid,v2:oid):oid
+pattern calc.max_no_nil(v1:any_1,v2:any_1):any_1
address CALCmax_no_nil;
comment Return max of V1 and V2, ignoring nil values
-pattern calc.max_no_nil(v1:dbl,v2:dbl):dbl
-address CALCmax_no_nil;
-comment Return max of V1 and V2, ignoring nil values
-
-pattern calc.max_no_nil(v1:flt,v2:flt):flt
-address CALCmax_no_nil;
-comment Return max of V1 and V2, ignoring nil values
-
-pattern calc.max_no_nil(v1:lng,v2:lng):lng
-address CALCmax_no_nil;
-comment Return max of V1 and V2, ignoring nil values
-
-pattern calc.max_no_nil(v1:wrd,v2:wrd):wrd
-address CALCmax_no_nil;
-comment Return max of V1 and V2, ignoring nil values
-
-pattern calc.max_no_nil(v1:int,v2:int):int
-address CALCmax_no_nil;
-comment Return max of V1 and V2, ignoring nil values
-
-pattern calc.max_no_nil(v1:sht,v2:sht):sht
-address CALCmax_no_nil;
-comment Return max of V1 and V2, ignoring nil values
-
-pattern calc.max_no_nil(v1:bte,v2:bte):bte
-address CALCmax_no_nil;
-comment Return max of V1 and V2, ignoring nil values
-
-pattern calc.max_no_nil(v1:bit,v2:bit):bit
-address CALCmax_no_nil;
-comment Return max of V1 and V2, ignoring nil values
-
-pattern calc.max(v1:oid,v2:oid):oid
+pattern calc.max(v1:any_1,v2:any_1):any_1
address CALCmax;
comment Return max of V1 and V2
-pattern calc.max(v1:dbl,v2:dbl):dbl
-address CALCmax;
-comment Return max of V1 and V2
-
-pattern calc.max(v1:flt,v2:flt):flt
-address CALCmax;
-comment Return max of V1 and V2
-
-pattern calc.max(v1:lng,v2:lng):lng
-address CALCmax;
-comment Return max of V1 and V2
-
-pattern calc.max(v1:wrd,v2:wrd):wrd
-address CALCmax;
-comment Return max of V1 and V2
-
-pattern calc.max(v1:int,v2:int):int
-address CALCmax;
-comment Return max of V1 and V2
-
-pattern calc.max(v1:sht,v2:sht):sht
-address CALCmax;
-comment Return max of V1 and V2
-
-pattern calc.max(v1:bte,v2:bte):bte
-address CALCmax;
-comment Return max of V1 and V2
-
-pattern calc.max(v1:bit,v2:bit):bit
-address CALCmax;
-comment Return max of V1 and V2
-
-pattern calc.min_no_nil(v1:oid,v2:oid):oid
+pattern calc.min_no_nil(v1:any_1,v2:any_1):any_1
address CALCmin_no_nil;
comment Return min of V1 and V2, ignoring nil values
-pattern calc.min_no_nil(v1:dbl,v2:dbl):dbl
-address CALCmin_no_nil;
-comment Return min of V1 and V2, ignoring nil values
-
-pattern calc.min_no_nil(v1:flt,v2:flt):flt
-address CALCmin_no_nil;
-comment Return min of V1 and V2, ignoring nil values
-
-pattern calc.min_no_nil(v1:lng,v2:lng):lng
-address CALCmin_no_nil;
-comment Return min of V1 and V2, ignoring nil values
-
-pattern calc.min_no_nil(v1:wrd,v2:wrd):wrd
-address CALCmin_no_nil;
-comment Return min of V1 and V2, ignoring nil values
-
-pattern calc.min_no_nil(v1:int,v2:int):int
-address CALCmin_no_nil;
-comment Return min of V1 and V2, ignoring nil values
-
-pattern calc.min_no_nil(v1:sht,v2:sht):sht
-address CALCmin_no_nil;
-comment Return min of V1 and V2, ignoring nil values
-
-pattern calc.min_no_nil(v1:bte,v2:bte):bte
-address CALCmin_no_nil;
-comment Return min of V1 and V2, ignoring nil values
-
-pattern calc.min_no_nil(v1:bit,v2:bit):bit
-address CALCmin_no_nil;
-comment Return min of V1 and V2, ignoring nil values
-
-pattern calc.min(v1:oid,v2:oid):oid
+pattern calc.min(v1:any_1,v2:any_1):any_1
address CALCmin;
comment Return min of V1 and V2
-pattern calc.min(v1:dbl,v2:dbl):dbl
-address CALCmin;
-comment Return min of V1 and V2
-
-pattern calc.min(v1:flt,v2:flt):flt
-address CALCmin;
-comment Return min of V1 and V2
-
-pattern calc.min(v1:lng,v2:lng):lng
-address CALCmin;
-comment Return min of V1 and V2
-
-pattern calc.min(v1:wrd,v2:wrd):wrd
-address CALCmin;
-comment Return min of V1 and V2
-
-pattern calc.min(v1:int,v2:int):int
-address CALCmin;
-comment Return min of V1 and V2
-
-pattern calc.min(v1:sht,v2:sht):sht
-address CALCmin;
-comment Return min of V1 and V2
-
-pattern calc.min(v1:bte,v2:bte):bte
-address CALCmin;
-comment Return min of V1 and V2
-
-pattern calc.min(v1:bit,v2:bit):bit
-address CALCmin;
-comment Return min of V1 and V2
-
pattern calc.mod_noerror(v1:dbl,v2:dbl):dbl
address CMDvarMOD;
comment Return V1 % V2, divide by zero causes NIL value
@@ -36801,70 +36705,6 @@ pattern calc.mul_noerror(v1:bte,v2:bte):
address CMDvarMUL;
comment Return V1 * V2, overflow causes NIL value
-pattern calc.max_no_nil(v:timestamp,w:timestamp):timestamp
-address CALCmax_no_nil;
-comment Maximum test for timestamp value
-
-pattern calc.min_no_nil(v:timestamp,w:timestamp):timestamp
-address CALCmin_no_nil;
-comment Minimum test for timestamp value
-
-pattern calc.max(v:timestamp,w:timestamp):timestamp
-address CALCmax;
-comment Maximum test for timestamp value
-
-pattern calc.min(v:timestamp,w:timestamp):timestamp
-address CALCmin;
-comment Minimum test for timestamp value
-
-pattern calc.max_no_nil(v:daytime,w:daytime):daytime
-address CALCmax_no_nil;
-comment Maximum test for daytime value
-
-pattern calc.min_no_nil(v:daytime,w:daytime):daytime
-address CALCmin_no_nil;
-comment Minimum test for daytime value
-
-pattern calc.max(v:daytime,w:daytime):daytime
-address CALCmax;
-comment Maximum test for daytime value
-
-pattern calc.min(v:daytime,w:daytime):daytime
-address CALCmin;
-comment Minimum test for daytime value
-
-pattern calc.max_no_nil(v:date,w:date):date
-address CALCmax_no_nil;
-comment Maximum test for date value
-
-pattern calc.min_no_nil(v:date,w:date):date
-address CALCmin_no_nil;
-comment Minimum test for date value
-
-pattern calc.max(v:date,w:date):date
-address CALCmax;
-comment Maximum test for date value
-
-pattern calc.min(v:date,w:date):date
-address CALCmin;
-comment Minimum test for date value
-
-command calc.min_no_nil(s:str,t:str):str
-address STRmin_no_nil;
-comment Select the minimum string in lexicographic order, ignoring nils
-
-command calc.min(s:str,t:str):str
-address STRmin;
-comment Select the minimum string in lexicographic order
-
-command calc.max_no_nil(s:str,t:str):str
-address STRmax_no_nil;
-comment Select the maximum string in lexicographic order, ignoring nils
-
-command calc.max(s:str,t:str):str
-address STRmax;
-comment Select the maximum string in lexicographic order
-
pattern calc.not(v:lng):lng
address CMDvarNOT;
comment Unary bitwise not of V
diff --git a/clients/Tests/MAL-signatures_all.stable.out.int128
b/clients/Tests/MAL-signatures_all.stable.out.int128
--- a/clients/Tests/MAL-signatures_all.stable.out.int128
+++ b/clients/Tests/MAL-signatures_all.stable.out.int128
@@ -35622,6 +35622,38 @@ pattern batcalc.mul_noerror(b1:bat[:oid,
address CMDbatMUL;
comment Return B1 * B2, overflow causes NIL value
+pattern
batcalc.max_no_nil(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1],s:bat[:oid,:oid]):bat[:oid,:any_1]
+address CMDbatMAX_no_nil;
+comment Return bat with maximum value of each pair of inputs, ignoring nil
values
+
+pattern
batcalc.max_no_nil(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1]):bat[:oid,:any_1]
+address CMDbatMAX_no_nil;
+comment Return bat with maximum value of each pair of inputs, ignoring nil
values
+
+pattern
batcalc.max(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1],s:bat[:oid,:oid]):bat[:oid,:any_1]
+address CMDbatMAX;
+comment Return bat with maximum value of each pair of inputs
+
+pattern batcalc.max(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1]):bat[:oid,:any_1]
+address CMDbatMAX;
+comment Return bat with maximum value of each pair of inputs
+
+pattern
batcalc.min_no_nil(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1],s:bat[:oid,:oid]):bat[:oid,:any_1]
+address CMDbatMIN_no_nil;
+comment Return bat with minimum value of each pair of inputs, ignoring nil
values
+
+pattern
batcalc.min_no_nil(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1]):bat[:oid,:any_1]
+address CMDbatMIN_no_nil;
+comment Return bat with minimum value of each pair of inputs, ignoring nil
values
+
+pattern
batcalc.min(b1:bat[:oid,:any_1],b2:bat[:oid,:any_1],s:bat[:oid,:oid]):bat[:oid,:any_1]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list