Changeset: 1382ff583530 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1382ff583530
Added Files:
        monetdb5/modules/mal/calc.h
Modified Files:
        clients/Tests/MAL-signatures-hge.test
        clients/Tests/MAL-signatures.test
        monetdb5/modules/mal/calc.c
        monetdb5/modules/mal/pp_algebra.c
        sql/backends/monet5/sql_pp_statement.c
Branch: pp_hashjoin
Log Message:

cleaned up iaggr.* functions (used for the core phase of incremental global
aggregations):

- all functions in this phase get the module name "iaggr"
- added proper MAL function declarations for iaggr.{sum,prod,avg}
- from now on, a global aggregate should be implemented with an
"iaggr.<aggr-func-name>" for the core phase, and a "lockedaggr.<aggr-func-name>"
for the combine phase.


diffs (truncated from 3234 to 300 lines):

diff --git a/clients/Tests/MAL-signatures-hge.test 
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -165,26 +165,6 @@ AGGRavg24_dbl
 Grouped tail average on sht, also returns count
 aggr
 avg
-command aggr.avg(X_0:bat[:dbl]) (X_1:dbl, X_2:dbl, X_3:lng)
-ALGfsum
-Return the Kahan/Neumaier summation.
-aggr
-avg
-command aggr.avg(X_0:bat[:flt]) (X_1:dbl, X_2:dbl, X_3:lng)
-ALGfsum
-Return the Kahan/Neumaier summation.
-aggr
-avg
-command aggr.avg(X_0:bat[:dbl], X_1:bit) (X_2:dbl, X_3:dbl, X_4:lng)
-ALGfsum_skipnil
-Return the Kahan/Neumaier summation or nil.
-aggr
-avg
-command aggr.avg(X_0:bat[:flt], X_1:bit) (X_2:dbl, X_3:dbl, X_4:lng)
-ALGfsum_skipnil
-Return the Kahan/Neumaier summation or nil.
-aggr
-avg
 pattern aggr.avg(X_0:bat[:bte], X_1:bat[:oid], X_2:bit) (X_3:bte, X_4:lng, 
X_5:lng)
 CMDBATavg3
 Calculate aggregate average of B.
@@ -252,12 +232,12 @@ aggr
 avg
 pattern aggr.avg(X_0:bat[:oid], X_1:bat[:any_1], X_2:bat[:lng], X_3:bat[:lng], 
X_4:ptr, X_5:bat[:oid]) (X_6:bat[:any_1], X_7:bat[:lng], X_8:bat[:lng])
 LALGavg
-avg per group.
+avg of integers/decimals per group.
 aggr
 avg
 pattern aggr.avg(X_0:bat[:oid], X_1:bat[:any_1], X_2:ptr, X_3:bat[:oid]) 
(X_4:bat[:any_1], X_5:bat[:lng], X_6:bat[:lng])
 LALGavg
-avg per group.
+avg of integers/decimals per group.
 aggr
 avg
 pattern aggr.avg(X_0:bat[:oid], X_1:bat[:any_1], X_2:ptr, X_3:bat[:oid]) 
(X_4:bat[:dbl], X_5:bat[:dbl], X_6:bat[:lng])
@@ -564,11 +544,6 @@ command aggr.null(X_0:bat[:any_1]):bit
 SQLnil
 if b has a nil return true, else false
 aggr
-ord_quantile
-command aggr.ord_quantile(X_0:bat[:oid], X_1:bat[:any_1], X_2:bte):bat[:any_1]
-LALGquantile
-Return the p-th's quantile per group, where p is between 0 and 100
-aggr
 prod
 command aggr.prod(X_0:bat[:bte], X_1:bat[:oid], X_2:bat[:any_1]):bat[:bte]
 AGGRprod3_bte
@@ -2790,36 +2765,6 @@ AGGRsum3_sht
 Grouped tail sum on sht
 aggr
 sum
-command aggr.sum(X_0:bat[:dbl]) (X_1:dbl, X_2:dbl, X_3:lng)
-ALGfsum
-Return the Kahan/Neumaier summation.
-aggr
-sum
-command aggr.sum(X_0:bat[:flt]) (X_1:dbl, X_2:dbl, X_3:lng)
-ALGfsum
-Return the Kahan/Neumaier summation.
-aggr
-sum
-command aggr.sum(X_0:bat[:flt]) (X_1:flt, X_2:flt, X_3:lng)
-ALGfsum_flt
-Return the Kahan/Neumaier summation.
-aggr
-sum
-command aggr.sum(X_0:bat[:dbl], X_1:bit) (X_2:dbl, X_3:dbl, X_4:lng)
-ALGfsum_skipnil
-Return the Kahan/Neumaier summation or nil.
-aggr
-sum
-command aggr.sum(X_0:bat[:flt], X_1:bit) (X_2:dbl, X_3:dbl, X_4:lng)
-ALGfsum_skipnil
-Return the Kahan/Neumaier summation or nil.
-aggr
-sum
-command aggr.sum(X_0:bat[:flt], X_1:bit) (X_2:flt, X_3:flt, X_4:lng)
-ALGfsum_skipnil_flt
-Return the Kahan/Neumaier summation or nil.
-aggr
-sum
 pattern aggr.sum(X_0:bat[:bte]):bte
 CMDBATsum
 Calculate aggregate sum of B.
@@ -3912,7 +3857,7 @@ algebra
 unique
 command algebra.unique(X_0:ptr, X_1:bat[:any_1], X_2:bat[:oid], X_3:bat[:oid]) 
(X_4:bat[:oid], X_5:bat[:any_1])
 LALGgroup_unique
-Unique per group rows.
+Unique rows per group.
 algebra
 unique
 command algebra.unique(X_0:ptr, X_1:bat[:any_1], X_2:bat[:oid]) 
(X_3:bat[:oid], X_4:bat[:any_1])
@@ -47419,60 +47364,1180 @@ pattern heapn.topn(X_0:lng, X_1:any...) 
 HEAPtopn
 Return table with heap based topn, and positions and candidate for any 
projections
 iaggr
+avg
+pattern iaggr.avg(X_0:bat[:bte], X_1:bat[:oid], X_2:bit) (X_3:bte, X_4:lng, 
X_5:lng)
+CMDBATavg3
+Calculate aggregate average of B.
+iaggr
+avg
+pattern iaggr.avg(X_0:bat[:hge], X_1:bat[:oid], X_2:bit) (X_3:hge, X_4:lng, 
X_5:lng)
+CMDBATavg3
+Calculate aggregate average of B.
+iaggr
+avg
+pattern iaggr.avg(X_0:bat[:int], X_1:bat[:oid], X_2:bit) (X_3:int, X_4:lng, 
X_5:lng)
+CMDBATavg3
+Calculate aggregate average of B.
+iaggr
+avg
+pattern iaggr.avg(X_0:bat[:lng], X_1:bat[:oid], X_2:bit) (X_3:lng, X_4:lng, 
X_5:lng)
+CMDBATavg3
+Calculate aggregate average of B.
+iaggr
+avg
+pattern iaggr.avg(X_0:bat[:sht], X_1:bat[:oid], X_2:bit) (X_3:sht, X_4:lng, 
X_5:lng)
+CMDBATavg3
+Calculate aggregate average of B.
+iaggr
+avg
+command iaggr.avg(X_0:bat[:dbl]) (X_1:dbl, X_2:dbl, X_3:lng)
+IALGfsum
+Return the Kahan/Neumaier summation.
+iaggr
+avg
+command iaggr.avg(X_0:bat[:flt]) (X_1:dbl, X_2:dbl, X_3:lng)
+IALGfsum
+Return the Kahan/Neumaier summation.
+iaggr
+avg
+command iaggr.avg(X_0:bat[:dbl], X_1:bit) (X_2:dbl, X_3:dbl, X_4:lng)
+IALGfsum_skipnil
+Return the Kahan/Neumaier summation or nil.
+iaggr
+avg
+command iaggr.avg(X_0:bat[:flt], X_1:bit) (X_2:dbl, X_3:dbl, X_4:lng)
+IALGfsum_skipnil
+Return the Kahan/Neumaier summation or nil.
+iaggr
 count
 command iaggr.count(X_0:bat[:any], X_1:bat[:oid]):lng
-ALGcountCND_bat
-Return the current size (in number of elements) in a BAT.
+IALGcountCND_bat
+Return the number of elements currently in a BAT.
 iaggr
 count
 command iaggr.count(X_0:bat[:any], X_1:bat[:oid], X_2:bit):lng
-ALGcountCND_nil
-Return the number of elements currently in a BAT ignores@BUNs with nil-tail 
iff ignore_nils==TRUE.
+IALGcountCND_nil
+Return the number of elements currently in a BAT, ignore BUNs with nil-tail 
iff ignore_nils==TRUE.
 iaggr
 count
 command iaggr.count(X_0:bat[:any]):lng
-ALGcount_bat
-Return the current size (in number of elements) in a BAT.
+IALGcount_bat
+Return the number of elements currently in a BAT.
 iaggr
 count
 command iaggr.count(X_0:bat[:any], X_1:bit):lng
-ALGcount_nil
-Return the number of elements currently in a BAT ignores@BUNs with nil-tail 
iff ignore_nils==TRUE.
+IALGcount_nil
+Return the number of elements currently in a BAT, ignore BUNs with nil-tail 
iff ignore_nils==TRUE.
 iaggr
 count_no_nil
 command iaggr.count_no_nil(X_0:bat[:any_2], X_1:bat[:oid]):lng
-ALGcountCND_no_nil
-Return the number of elements currently@in a BAT ignoring BUNs with nil-tail
+IALGcountCND_no_nil
+Return the number of elements currently in a BAT, ignore BUNs with nil-tail
 iaggr
 count_no_nil
 command iaggr.count_no_nil(X_0:bat[:any_2]):lng
-ALGcount_no_nil
-Return the number of elements currently@in a BAT ignoring BUNs with nil-tail
+IALGcount_no_nil
+Return the number of elements currently in a BAT, ignore BUNs with nil-tail
 iaggr
 max
 command iaggr.max(X_0:bat[:any_2]):any_2
-ALGmaxany
+IALGmaxany
 Return the highest tail value or nil.
 iaggr
 max
 command iaggr.max(X_0:bat[:any_2], X_1:bit):any_2
-ALGmaxany_skipnil
+IALGmaxany_skipnil
 Return the highest tail value or nil.
 iaggr
 min
 command iaggr.min(X_0:bat[:any_2]):any_2
-ALGminany
+IALGminany
 Return the lowest tail value or nil.
 iaggr
 min
 command iaggr.min(X_0:bat[:any_2], X_1:bit):any_2
-ALGminany_skipnil
+IALGminany_skipnil
 Return the lowest tail value or nil.
 iaggr
 null
 command iaggr.null(X_0:bat[:any_1]):bit
-ALGnull
+IALGnull
 Returns true or false if the input contains a NULL or not, nil if the input is 
empty..
+iaggr
+ord_quantile
+command iaggr.ord_quantile(X_0:bat[:oid], X_1:bat[:any_1], X_2:bte):bat[:any_1]
+IALGquantile
+Return the p-th's quantile per group, where p is between 0 and 100
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte]):bte
+CMDBATprod
+Calculate aggregate product of B.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte]):dbl
+CMDBATprod
+Calculate aggregate product of B.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte]):hge
+CMDBATprod
+Calculate aggregate product of B.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte]):int
+CMDBATprod
+Calculate aggregate product of B.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte]):lng
+CMDBATprod
+Calculate aggregate product of B.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte]):sht
+CMDBATprod
+Calculate aggregate product of B.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte], X_1:bat[:oid]):bte
+CMDBATprod
+Calculate aggregate product of B with candidate list.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte], X_1:bat[:oid]):dbl
+CMDBATprod
+Calculate aggregate product of B with candidate list.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte], X_1:bat[:oid]):hge
+CMDBATprod
+Calculate aggregate product of B with candidate list.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte], X_1:bat[:oid]):int
+CMDBATprod
+Calculate aggregate product of B with candidate list.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte], X_1:bat[:oid]):lng
+CMDBATprod
+Calculate aggregate product of B with candidate list.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte], X_1:bat[:oid]):sht
+CMDBATprod
+Calculate aggregate product of B with candidate list.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte], X_1:bat[:oid], X_2:bit):bte
+CMDBATprod
+Calculate aggregate product of B with candidate list.
+iaggr
+prod
+pattern iaggr.prod(X_0:bat[:bte], X_1:bat[:oid], X_2:bit):dbl
+CMDBATprod
+Calculate aggregate product of B with candidate list.
+iaggr
+prod
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to