Changeset: 3f57810adec0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f57810adec0
Modified Files:
        sql/backends/monet5/sql.mal
        sql/common/sql_types.c
Branch: subquery
Log Message:

move aggregate functions to the proper module (solving mitosis problems)


diffs (35 lines):

diff --git a/sql/backends/monet5/sql.mal b/sql/backends/monet5/sql.mal
--- a/sql/backends/monet5/sql.mal
+++ b/sql/backends/monet5/sql.mal
@@ -342,6 +342,8 @@ command all(cmp:bit, nl:bit, nr:bit) :bi
 address SQLall_cmp
 comment "if !cmp then false, (nl or nr) then nil, else true";
 
+module aggr;
+
 command anyequal(l:bat[:any_1], r:bat[:any_1]) :bit
 address SQLanyequal
 comment "if any value in r is equal to l return true, else if r has nil nil 
else false";
@@ -366,6 +368,8 @@ command suballnotequal(l:bat[:any_1], r:
 address SQLallnotequal_grp2
 comment "if all values in r are not equal to l return true, else if r has nil 
nil else false, except if rid is nil (ie empty) then true";
 
+module sql;
+
 # todo implement = all aggregator (ie keep last value and compare status)
 inline function sql.all( b:bat[:any_1], gp:bat[:oid], gpe:bat[:oid], 
no_nil:bit) :bat[:any_1];
        (g,e,h) := group.group(gp);
diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c
--- a/sql/common/sql_types.c
+++ b/sql/common/sql_types.c
@@ -1556,8 +1556,8 @@ sqltypeinit( sql_allocator *sa)
        sql_create_aggr(sa, "null", "sql", "null", ANY, BIT);
        sql_create_func3(sa, "any", "sql", "any", BIT, BIT, BIT, BIT, 
SCALE_NONE);
        sql_create_func3(sa, "all", "sql", "all", BIT, BIT, BIT, BIT, 
SCALE_NONE);
-       sql_create_aggr(sa, "anyequal", "sql", "anyequal", ANY, BIT); /* needs 
3 arguments (l,r,nil)(ugh) */
-       sql_create_aggr(sa, "allnotequal", "sql", "allnotequal", ANY, BIT); /* 
needs 3 arguments (l,r,nil)(ugh) */
+       sql_create_aggr(sa, "anyequal", "aggr", "anyequal", ANY, BIT); /* needs 
3 arguments (l,r,nil)(ugh) */
+       sql_create_aggr(sa, "allnotequal", "aggr", "allnotequal", ANY, BIT); /* 
needs 3 arguments (l,r,nil)(ugh) */
        sql_create_aggr(sa, "exist", "aggr", "exist", ANY, BIT);
        sql_create_aggr(sa, "not_exist", "aggr", "not_exist", ANY, BIT);
        sql_create_func(sa, "sql_exists", "aggr", "exist", ANY, NULL, BIT, 
SCALE_NONE);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to