Changeset: 5f81699ab519 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5f81699ab519
Modified Files:
        monetdb5/mal/Tests/performanceTests/join.malC
        monetdb5/mal/Tests/tst1602.malC
        monetdb5/modules/kernel/algebra.c
        monetdb5/modules/kernel/algebra.h
        monetdb5/modules/kernel/algebra.mal
        monetdb5/modules/mal/pcre.c
        monetdb5/modules/mal/pcre.mal
        monetdb5/optimizer/Tests/DCexample.malC
        monetdb5/optimizer/Tests/mat00.malC
        monetdb5/optimizer/Tests/qep00.malC
        monetdb5/optimizer/Tests/qep01.malC
        monetdb5/optimizer/Tests/qep02.malC
        monetdb5/optimizer/opt_candidates.c
        monetdb5/optimizer/opt_costModel.c
        monetdb5/optimizer/opt_mergetable.c
        monetdb5/optimizer/opt_prelude.c
        monetdb5/optimizer/opt_prelude.h
        monetdb5/optimizer/opt_profiler.c
        monetdb5/optimizer/opt_pushselect.c
        monetdb5/optimizer/opt_support.c
        monetdb5/optimizer/opt_volcano.c
        sql/backends/monet5/sql_statement.c
        testing/Mtest.py.in
Branch: default
Log Message:

A few more renamings.
subdiff -> difference;
subinter -> intersect;
subjoin ->join
subleftjoin ->leftjoin
subantijoin ->antijoin
subbandjoin ->bandjoin
subrangejoin ->rangjoin
subthetajoin ->thetajoin


diffs (truncated from 937 to 300 lines):

diff --git a/monetdb5/mal/Tests/performanceTests/join.malC 
b/monetdb5/mal/Tests/performanceTests/join.malC
--- a/monetdb5/mal/Tests/performanceTests/join.malC
+++ b/monetdb5/mal/Tests/performanceTests/join.malC
@@ -15,11 +15,11 @@ t1:= alarm.usec();
 t2:= alarm.usec();
 b:= algebra.select(b,nil:int,rl);
 c:= algebra.select(c,nil:int,il);
-x:= algebra.subjoin(b,c);
+x:= algebra.join(b,c);
 t3:= alarm.usec();
 b:= algebra.select(b,nil:int,rl);
 c:= algebra.select(c,nil:int,il);
-y:= algebra.subjoin(b,c);
+y:= algebra.join(b,c);
 t4:= alarm.usec();
 d1:= t2-t0;
 d2:= t3-t2;
diff --git a/monetdb5/mal/Tests/tst1602.malC b/monetdb5/mal/Tests/tst1602.malC
--- a/monetdb5/mal/Tests/tst1602.malC
+++ b/monetdb5/mal/Tests/tst1602.malC
@@ -21,7 +21,7 @@ exit  sj_a;
 mdb.setDebug(dbgmsk_restore);
 
         t := alarm.time();
-        (vg_a,xg_b) := 
algebra.subjoin(int_1M,int_1M,nil:bat,nil:bat,false,nil:lng);
+        (vg_a,xg_b) := 
algebra.join(int_1M,int_1M,nil:bat,nil:bat,false,nil:lng);
         wg_a := aggr.count(vg_a);
         xg_a := io.printf("#count %d = ",wg_a);
         x:= alarm.time();
@@ -30,7 +30,7 @@ mdb.setDebug(dbgmsk_restore);
 
 
         t := alarm.time();
-        (vg_a,xg_b) := 
algebra.subjoin(int_1M,int_1M,nil:bat,nil:bat,false,nil:lng);
+        (vg_a,xg_b) := 
algebra.join(int_1M,int_1M,nil:bat,nil:bat,false,nil:lng);
         wg_a := aggr.count(vg_a);
         xg_a := io.printf("#count %d = ",wg_a);
         x:= alarm.time();
@@ -38,7 +38,7 @@ mdb.setDebug(dbgmsk_restore);
                ah_a := io.printf("%d ms\n",yg_a);
 
         t := alarm.time();
-        (vg_a,xg_b) := 
algebra.subjoin(int_1M,int_1M,nil:bat,nil:bat,false,nil:lng);
+        (vg_a,xg_b) := 
algebra.join(int_1M,int_1M,nil:bat,nil:bat,false,nil:lng);
         wg_a := aggr.count(vg_a);
         xg_a := io.printf("#count %d = ",wg_a);
         x:= alarm.time();
@@ -47,7 +47,7 @@ mdb.setDebug(dbgmsk_restore);
 
 
         t := alarm.time();
-        (vg_a,xg_b) := 
algebra.subjoin(int_1M,int_1M,nil:bat,nil:bat,false,nil:lng);
+        (vg_a,xg_b) := 
algebra.join(int_1M,int_1M,nil:bat,nil:bat,false,nil:lng);
         wg_a := aggr.count(vg_a);
         xg_a := io.printf("#count %d = ",wg_a);
         x:= alarm.time();
@@ -72,7 +72,7 @@ exit  sj_b;
 mdb.setDebug(dbgmsk_restore);
 
         t := alarm.time();
-        (vg_b,z) := algebra.subjoin(M2,M2,nil:bat,nil:bat,false,nil:lng);
+        (vg_b,z) := algebra.join(M2,M2,nil:bat,nil:bat,false,nil:lng);
         wg_b := aggr.count(vg_b);
         xxx := io.printf("#count %d = ",wg_b);
         x:= alarm.time();
@@ -81,7 +81,7 @@ mdb.setDebug(dbgmsk_restore);
 
 
         t := alarm.time();
-        (vg_b,z) := algebra.subjoin(M2,M2,nil:bat,nil:bat,false,nil:lng);
+        (vg_b,z) := algebra.join(M2,M2,nil:bat,nil:bat,false,nil:lng);
         wg_b := aggr.count(vg_b);
         xxx := io.printf("#count %d = ",wg_b);
         x:= alarm.time();
@@ -89,7 +89,7 @@ mdb.setDebug(dbgmsk_restore);
        ah_b := io.printf("%d ms\n",zzz);
 
         t := alarm.time();
-        (vg_b,z) := algebra.subjoin(M2,M2,nil:bat,nil:bat,false,nil:lng);
+        (vg_b,z) := algebra.join(M2,M2,nil:bat,nil:bat,false,nil:lng);
         wg_b := aggr.count(vg_b);
         xxx := io.printf("#count %d = ",wg_b);
         x:= alarm.time();
@@ -98,7 +98,7 @@ mdb.setDebug(dbgmsk_restore);
 
 
         t := alarm.time();
-        (vg_b,z) := algebra.subjoin(M2,M2,nil:bat,nil:bat,false,nil:lng);
+        (vg_b,z) := algebra.join(M2,M2,nil:bat,nil:bat,false,nil:lng);
         wg_b := aggr.count(vg_b);
         xxx := io.printf("#count %d = ",wg_b);
         x:= alarm.time();
diff --git a/monetdb5/modules/kernel/algebra.c 
b/monetdb5/modules/kernel/algebra.c
--- a/monetdb5/modules/kernel/algebra.c
+++ b/monetdb5/modules/kernel/algebra.c
@@ -427,84 +427,84 @@ do_join(bat *r1, bat *r2, const bat *lid
 }
 
 str
-ALGsubjoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat *slid, 
const bat *srid,
+ALGjoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat *slid, 
const bat *srid,
                   const bit *nil_matches, const lng *estimate)
 {
        return do_join(r1, r2, lid, rid, NULL, slid, srid, 0, NULL, NULL, 0, 0,
                                   nil_matches, estimate,
-                                  BATjoin, NULL, NULL, NULL, NULL, 
"algebra.subjoin");
+                                  BATjoin, NULL, NULL, NULL, NULL, 
"algebra.join");
 }
 
 str
-ALGsubleftjoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid,
+ALGleftjoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat *slid, 
const bat *srid,
                           const bit *nil_matches, const lng *estimate)
 {
        return do_join(r1, r2, lid, rid, NULL, slid, srid, 0, NULL, NULL, 0, 0,
                                   nil_matches, estimate,
-                                  BATleftjoin, NULL, NULL, NULL, NULL, 
"algebra.subleftjoin");
+                                  BATleftjoin, NULL, NULL, NULL, NULL, 
"algebra.leftjoin");
 }
 
 str
-ALGsubouterjoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid,
+ALGouterjoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid,
                                const bit *nil_matches, const lng *estimate)
 {
        return do_join(r1, r2, lid, rid, NULL, slid, srid, 0, NULL, NULL, 0, 0,
                                   nil_matches, estimate,
-                                  BATouterjoin, NULL, NULL, NULL, NULL, 
"algebra.subouterjoin");
+                                  BATouterjoin, NULL, NULL, NULL, NULL, 
"algebra.outerjoin");
 }
 
 str
-ALGsubsemijoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid,
+ALGsemijoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat *slid, 
const bat *srid,
                           const bit *nil_matches, const lng *estimate)
 {
        return do_join(r1, r2, lid, rid, NULL, slid, srid, 0, NULL, NULL, 0, 0,
                                   nil_matches, estimate,
-                                  BATsemijoin, NULL, NULL, NULL, NULL, 
"algebra.subsemijoin");
+                                  BATsemijoin, NULL, NULL, NULL, NULL, 
"algebra.semijoin");
 }
 
 str
-ALGsubthetajoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid,
+ALGthetajoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid,
                                const int *op, const bit *nil_matches, const 
lng *estimate)
 {
        return do_join(r1, r2, lid, rid, NULL, slid, srid, *op, NULL, NULL, 0, 
0,
                                   nil_matches, estimate,
-                                  NULL, BATthetajoin, NULL, NULL, NULL, 
"algebra.subthetajoin");
+                                  NULL, BATthetajoin, NULL, NULL, NULL, 
"algebra.thetajoin");
 }
 
 str
-ALGsubbandjoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid,
+ALGbandjoin(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat *slid, 
const bat *srid,
                           const void *c1, const void *c2, const bit *li, const 
bit *hi,
                           const lng *estimate)
 {
        return do_join(r1, r2, lid, rid, NULL, slid, srid, 0, c1, c2, *li, *hi,
                                   NULL, estimate,
-                                  NULL, NULL, BATbandjoin, NULL, NULL, 
"algebra.subbandjoin");
+                                  NULL, NULL, BATbandjoin, NULL, NULL, 
"algebra.bandjoin");
 }
 
 str
-ALGsubrangejoin(bat *r1, bat *r2, const bat *lid, const bat *rlid, const bat 
*rhid, const bat *slid, const bat *srid, const bit *li, const bit *hi, const 
lng *estimate)
+ALGrangejoin(bat *r1, bat *r2, const bat *lid, const bat *rlid, const bat 
*rhid, const bat *slid, const bat *srid, const bit *li, const bit *hi, const 
lng *estimate)
 {
        return do_join(r1, r2, lid, rlid, rhid, slid, srid, 0, NULL, NULL, *li, 
*hi,
                                   NULL, estimate,
-                                  NULL, NULL, NULL, BATrangejoin, NULL, 
"algebra.subrangejoin");
+                                  NULL, NULL, NULL, BATrangejoin, NULL, 
"algebra.rangejoin");
 }
 
 str
-ALGsubdiff(bat *r1, const bat *lid, const bat *rid, const bat *slid, const bat 
*srid,
+ALGdifference(bat *r1, const bat *lid, const bat *rid, const bat *slid, const 
bat *srid,
                           const bit *nil_matches, const lng *estimate)
 {
        return do_join(r1, NULL, lid, rid, NULL, slid, srid, 0, NULL, NULL, 0, 
0,
                                   nil_matches, estimate,
-                                  NULL, NULL, NULL, NULL, BATdiff, 
"algebra.subdiff");
+                                  NULL, NULL, NULL, NULL, BATdiff, 
"algebra.difference");
 }
 
 str
-ALGsubinter(bat *r1, const bat *lid, const bat *rid, const bat *slid, const 
bat *srid,
+ALGintersect(bat *r1, const bat *lid, const bat *rid, const bat *slid, const 
bat *srid,
                           const bit *nil_matches, const lng *estimate)
 {
        return do_join(r1, NULL, lid, rid, NULL, slid, srid, 0, NULL, NULL, 0, 
0,
                                   nil_matches, estimate,
-                                  BATsemijoin, NULL, NULL, NULL, NULL, 
"algebra.subdiff");
+                                  BATsemijoin, NULL, NULL, NULL, NULL, 
"algebra.difference");
 }
 
 /* algebra.firstn(b:bat[:any],
@@ -624,32 +624,32 @@ ALGcopy(bat *result, const bat *bid)
 }
 
 str
-ALGsubunique2(bat *result, const bat *bid, const bat *sid)
+ALGunique2(bat *result, const bat *bid, const bat *sid)
 {
        BAT *b, *s = NULL, *bn = NULL;
 
        if ((b = BATdescriptor(*bid)) == NULL) {
-               throw(MAL, "algebra.subunique", RUNTIME_OBJECT_MISSING);
+               throw(MAL, "algebra.unique", RUNTIME_OBJECT_MISSING);
        }
        if (sid && *sid != bat_nil && (s = BATdescriptor(*sid)) == NULL) {
                BBPunfix(b->batCacheid);
-               throw(MAL, "algebra.subunique", RUNTIME_OBJECT_MISSING);
+               throw(MAL, "algebra.unique", RUNTIME_OBJECT_MISSING);
        }
        bn = BATunique(b, s);
        BBPunfix(b->batCacheid);
        if (s)
                BBPunfix(s->batCacheid);
        if (bn == NULL)
-               throw(MAL, "algebra.subunique", GDK_EXCEPTION);
+               throw(MAL, "algebra.unique", GDK_EXCEPTION);
        *result = bn->batCacheid;
        BBPkeepref(*result);
        return MAL_SUCCEED;
 }
 
 str
-ALGsubunique1(bat *result, const bat *bid)
+ALGunique1(bat *result, const bat *bid)
 {
-       return ALGsubunique2(result, bid, NULL);
+       return ALGunique2(result, bid, NULL);
 }
 
 str
diff --git a/monetdb5/modules/kernel/algebra.h 
b/monetdb5/modules/kernel/algebra.h
--- a/monetdb5/modules/kernel/algebra.h
+++ b/monetdb5/modules/kernel/algebra.h
@@ -27,15 +27,15 @@ mal_export str ALGselect2(bat *result, c
 mal_export str ALGthetaselect1(bat *result, const bat *bid, const void *val, 
const char **op);
 mal_export str ALGthetaselect2(bat *result, const bat *bid, const bat *sid, 
const void *val, const char **op);
 
-mal_export str ALGsubjoin(bat *r1, bat *r2, const bat *l, const bat *r, const 
bat *sl, const bat *sr, const bit *nil_matches, const lng *estimate);
-mal_export str ALGsubleftjoin(bat *r1, bat *r2, const bat *l, const bat *r, 
const bat *sl, const bat *sr, const bit *nil_matches, const lng *estimate);
-mal_export str ALGsubouterjoin(bat *r1, bat *r2, const bat *l, const bat *r, 
const bat *sl, const bat *sr, const bit *nil_matches, const lng *estimate);
-mal_export str ALGsubsemijoin(bat *r1, bat *r2, const bat *l, const bat *r, 
const bat *sl, const bat *sr, const bit *nil_matches, const lng *estimate);
-mal_export str ALGsubthetajoin(bat *r1, bat *r2, const bat *l, const bat *r, 
const bat *sl, const bat *sr, const int *op, const bit *nil_matches, const lng 
*estimate);
-mal_export str ALGsubbandjoin(bat *r1, bat *r2, const bat *lid, const bat 
*rid, const bat *slid, const bat *srid, const void *low, const void *high, 
const bit *li, const bit *hi, const lng *estimate);
-mal_export str ALGsubrangejoin(bat *r1, bat *r2, const bat *lid, const bat 
*rlid, const bat *rhid, const bat *slid, const bat *srid, const bit *li, const 
bit *hi, const lng *estimate);
-mal_export str ALGsubdiff(bat *r1, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid, const bit *nil_matches, const lng *estimate);
-mal_export str ALGsubinter(bat *r1, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid, const bit *nil_matches, const lng *estimate);
+mal_export str ALGjoin(bat *r1, bat *r2, const bat *l, const bat *r, const bat 
*sl, const bat *sr, const bit *nil_matches, const lng *estimate);
+mal_export str ALGleftjoin(bat *r1, bat *r2, const bat *l, const bat *r, const 
bat *sl, const bat *sr, const bit *nil_matches, const lng *estimate);
+mal_export str ALGouterjoin(bat *r1, bat *r2, const bat *l, const bat *r, 
const bat *sl, const bat *sr, const bit *nil_matches, const lng *estimate);
+mal_export str ALGsemijoin(bat *r1, bat *r2, const bat *l, const bat *r, const 
bat *sl, const bat *sr, const bit *nil_matches, const lng *estimate);
+mal_export str ALGthetajoin(bat *r1, bat *r2, const bat *l, const bat *r, 
const bat *sl, const bat *sr, const int *op, const bit *nil_matches, const lng 
*estimate);
+mal_export str ALGbandjoin(bat *r1, bat *r2, const bat *lid, const bat *rid, 
const bat *slid, const bat *srid, const void *low, const void *high, const bit 
*li, const bit *hi, const lng *estimate);
+mal_export str ALGrangejoin(bat *r1, bat *r2, const bat *lid, const bat *rlid, 
const bat *rhid, const bat *slid, const bat *srid, const bit *li, const bit 
*hi, const lng *estimate);
+mal_export str ALGdifference(bat *r1, const bat *lid, const bat *rid, const 
bat *slid, const bat *srid, const bit *nil_matches, const lng *estimate);
+mal_export str ALGintersect(bat *r1, const bat *lid, const bat *rid, const bat 
*slid, const bat *srid, const bit *nil_matches, const lng *estimate);
 
 /* legacy join functions */
 mal_export str ALGcrossproduct2(bat *l, bat *r, const bat *lid, const bat 
*rid);
@@ -44,8 +44,8 @@ mal_export str ALGcrossproduct2(bat *l, 
 mal_export str ALGfirstn(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 
 mal_export str ALGcopy(bat *result, const bat *bid);
-mal_export str ALGsubunique2(bat *result, const bat *bid, const bat *sid);
-mal_export str ALGsubunique1(bat *result, const bat *bid);
+mal_export str ALGunique2(bat *result, const bat *bid, const bat *sid);
+mal_export str ALGunique1(bat *result, const bat *bid);
 mal_export str ALGprojection(bat *result, const bat *lid, const bat *rid);
 mal_export str ALGtinter(bat *result, const bat *lid, const bat *rid);
 mal_export str ALGtdiff(bat *result, const bat *lid, const bat *rid);
diff --git a/monetdb5/modules/kernel/algebra.mal 
b/monetdb5/modules/kernel/algebra.mal
--- a/monetdb5/modules/kernel/algebra.mal
+++ b/monetdb5/modules/kernel/algebra.mal
@@ -153,16 +153,16 @@ comment "Returns a copy of the BAT sorte
          The order is descending if the reverse bit is set.
                 This is a stable sort if the stable bit is set.";
 
-command subunique(b:bat[:any_1], s:bat[:oid]) :bat[:oid]
-address ALGsubunique2
+command unique(b:bat[:any_1], s:bat[:oid]) :bat[:oid]
+address ALGunique2
 comment "Select all unique values from the tail of the first input.
        Input is a dense-headed BAT, the second input is a
        dense-headed BAT with sorted tail, output is a dense-headed
        BAT with in the tail the head value of the input BAT that was
        selected.  The output BAT is sorted on the tail value.  The
        second input BAT is a list of candidates.";
-command subunique(b:bat[:any_1]) :bat[:oid]
-address ALGsubunique1
+command unique(b:bat[:any_1]) :bat[:oid]
+address ALGunique1
 comment "Select all unique values from the tail of the input.
        Input is a dense-headed BAT, output is a dense-headed BAT with
        in the tail the head value of the input BAT that was selected.
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to