Changeset: 62f8a6cf2f89 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=62f8a6cf2f89
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures_gsl.stable.out
        clients/Tests/MAL-signatures_nocfitsio.stable.out
        clients/Tests/MAL-signatures_sphinxclient.stable.out
        clients/Tests/exports.stable.out
        monetdb5/modules/kernel/algebra.c
        monetdb5/modules/kernel/algebra.h
        monetdb5/modules/kernel/algebra.mal
Branch: default
Log Message:

Remove algebra.merge and algebra.split.


diffs (241 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -2509,10 +2509,6 @@ command algebra.materialize(b:bat[:oid,:
 address ALGmaterialize;
 comment Materialize the void column
 
-command algebra.merge(b:bat[:oid,:oid]):bat[:lng,:oid] 
-address ALGmerge;
-comment Merge head and tail into a single value
-
 command 
algebra.mark_grp(b:bat[:any_1,:oid],g:bat[:oid,:any_2],s:oid):bat[:any_1,:oid] 
 address ALGmark_grp_2;
 comment "grouped mark": Produces a new BAT with per group a locally unique 
dense ascending sequense of OIDs in the tail. The tail of the first BAT (b) 
identifies the group that each BUN of b belongs to. The second BAT (g) 
represents the group extent, i.e., the head is the unique list of group IDs 
from b's tail. The third argument (s) gives the base value for the new OID 
sequence of each group.
@@ -2595,10 +2591,6 @@ pattern algebra.semijoinPath(l:bat[:any,
 address ALGjoinPath;
 comment Routine to handle join paths.  The type analysis is rather tricky.
 
-command algebra.split(b:bat[:lng,:oid]):bat[:oid,:oid] 
-address ALGsplit;
-comment Split head into two values
-
 command 
algebra.subthetajoin(l:bat[:oid,:any_1],r:bat[:oid,:any_1],sl:bat[:oid,:oid],sr:bat[:oid,:oid],op:int,nil_matches:bit,estimate:lng)
 (X_8:bat[:oid,:oid],X_9:bat[:oid,:oid]) 
 address ALGsubthetajoin;
 comment Theta join with candidate lists
diff --git a/clients/Tests/MAL-signatures_gsl.stable.out 
b/clients/Tests/MAL-signatures_gsl.stable.out
--- a/clients/Tests/MAL-signatures_gsl.stable.out
+++ b/clients/Tests/MAL-signatures_gsl.stable.out
@@ -2509,10 +2509,6 @@ command algebra.materialize(b:bat[:oid,:
 address ALGmaterialize;
 comment Materialize the void column
 
-command algebra.merge(b:bat[:oid,:oid]):bat[:lng,:oid] 
-address ALGmerge;
-comment Merge head and tail into a single value
-
 command 
algebra.mark_grp(b:bat[:any_1,:oid],g:bat[:oid,:any_2],s:oid):bat[:any_1,:oid] 
 address ALGmark_grp_2;
 comment "grouped mark": Produces a new BAT with per group a locally unique 
dense ascending sequense of OIDs in the tail. The tail of the first BAT (b) 
identifies the group that each BUN of b belongs to. The second BAT (g) 
represents the group extent, i.e., the head is the unique list of group IDs 
from b's tail. The third argument (s) gives the base value for the new OID 
sequence of each group.
@@ -2595,10 +2591,6 @@ pattern algebra.semijoinPath(l:bat[:any,
 address ALGjoinPath;
 comment Routine to handle join paths.  The type analysis is rather tricky.
 
-command algebra.split(b:bat[:lng,:oid]):bat[:oid,:oid] 
-address ALGsplit;
-comment Split head into two values
-
 command 
algebra.subthetajoin(l:bat[:oid,:any_1],r:bat[:oid,:any_1],sl:bat[:oid,:oid],sr:bat[:oid,:oid],op:int,nil_matches:bit,estimate:lng)
 (X_8:bat[:oid,:oid],X_9:bat[:oid,:oid]) 
 address ALGsubthetajoin;
 comment Theta join with candidate lists
diff --git a/clients/Tests/MAL-signatures_nocfitsio.stable.out 
b/clients/Tests/MAL-signatures_nocfitsio.stable.out
--- a/clients/Tests/MAL-signatures_nocfitsio.stable.out
+++ b/clients/Tests/MAL-signatures_nocfitsio.stable.out
@@ -2509,10 +2509,6 @@ command algebra.materialize(b:bat[:oid,:
 address ALGmaterialize;
 comment Materialize the void column
 
-command algebra.merge(b:bat[:oid,:oid]):bat[:lng,:oid] 
-address ALGmerge;
-comment Merge head and tail into a single value
-
 command 
algebra.mark_grp(b:bat[:any_1,:oid],g:bat[:oid,:any_2],s:oid):bat[:any_1,:oid] 
 address ALGmark_grp_2;
 comment "grouped mark": Produces a new BAT with per group a locally unique 
dense ascending sequense of OIDs in the tail. The tail of the first BAT (b) 
identifies the group that each BUN of b belongs to. The second BAT (g) 
represents the group extent, i.e., the head is the unique list of group IDs 
from b's tail. The third argument (s) gives the base value for the new OID 
sequence of each group.
@@ -2595,10 +2591,6 @@ pattern algebra.semijoinPath(l:bat[:any,
 address ALGjoinPath;
 comment Routine to handle join paths.  The type analysis is rather tricky.
 
-command algebra.split(b:bat[:lng,:oid]):bat[:oid,:oid] 
-address ALGsplit;
-comment Split head into two values
-
 command 
algebra.subthetajoin(l:bat[:oid,:any_1],r:bat[:oid,:any_1],sl:bat[:oid,:oid],sr:bat[:oid,:oid],op:int,nil_matches:bit,estimate:lng)
 (X_8:bat[:oid,:oid],X_9:bat[:oid,:oid]) 
 address ALGsubthetajoin;
 comment Theta join with candidate lists
diff --git a/clients/Tests/MAL-signatures_sphinxclient.stable.out 
b/clients/Tests/MAL-signatures_sphinxclient.stable.out
--- a/clients/Tests/MAL-signatures_sphinxclient.stable.out
+++ b/clients/Tests/MAL-signatures_sphinxclient.stable.out
@@ -2509,10 +2509,6 @@ command algebra.materialize(b:bat[:oid,:
 address ALGmaterialize;
 comment Materialize the void column
 
-command algebra.merge(b:bat[:oid,:oid]):bat[:lng,:oid] 
-address ALGmerge;
-comment Merge head and tail into a single value
-
 command 
algebra.mark_grp(b:bat[:any_1,:oid],g:bat[:oid,:any_2],s:oid):bat[:any_1,:oid] 
 address ALGmark_grp_2;
 comment "grouped mark": Produces a new BAT with per group a locally unique 
dense ascending sequense of OIDs in the tail. The tail of the first BAT (b) 
identifies the group that each BUN of b belongs to. The second BAT (g) 
represents the group extent, i.e., the head is the unique list of group IDs 
from b's tail. The third argument (s) gives the base value for the new OID 
sequence of each group.
@@ -2595,10 +2591,6 @@ pattern algebra.semijoinPath(l:bat[:any,
 address ALGjoinPath;
 comment Routine to handle join paths.  The type analysis is rather tricky.
 
-command algebra.split(b:bat[:lng,:oid]):bat[:oid,:oid] 
-address ALGsplit;
-comment Split head into two values
-
 command 
algebra.subthetajoin(l:bat[:oid,:any_1],r:bat[:oid,:any_1],sl:bat[:oid,:oid],sr:bat[:oid,:oid],op:int,nil_matches:bit,estimate:lng)
 (X_8:bat[:oid,:oid],X_9:bat[:oid,:oid]) 
 address ALGsubthetajoin;
 comment Theta join with candidate lists
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -780,7 +780,6 @@ str ALGmark_grp_1(int *result, int *bid,
 str ALGmark_grp_2(int *result, int *bid, int *gid, oid *base);
 str ALGmaterialize(int *ret, int *bid);
 str ALGmaxany(ptr result, int *bid);
-str ALGmerge(int *result, int *bid);
 str ALGminany(ptr result, int *bid);
 str ALGouterjoin(int *result, int *lid, int *rid);
 str ALGouterjoinestimate(int *result, int *lid, int *rid, lng *estimate);
@@ -809,7 +808,6 @@ str ALGslice(int *ret, bat *bid, lng *st
 str ALGslice_int(int *ret, bat *bid, int *start, int *end);
 str ALGslice_oid(int *ret, bat *bid, oid *start, oid *end);
 str ALGslice_wrd(int *ret, bat *bid, wrd *start, wrd *end);
-str ALGsplit(int *result, int *bid);
 str ALGssort(int *result, int *bid);
 str ALGssort_rev(int *result, int *bid);
 str ALGstdev(dbl *res, int *bid);
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
@@ -296,69 +296,6 @@ CMDexistBUN(bit *ret, BAT *b, ptr val, p
        return GDK_SUCCEED;
 }
 
-static BAT *
-BATmerge(BAT *b)
-{
-       BUN n = BATcount(b);
-       BAT *bn = BATnew(TYPE_lng, TYPE_void, n);
-       BATiter bni = bat_iterator(bn), bi = bat_iterator(b);
-       BUN p, q;
-       lng *r = (lng *) BUNhead(bni, BUNfirst(bn));
-
-       BATloop(b, p, q) {
-               oid hp = *(oid *) BUNhead(bi, p);
-               oid tp = *(oid *) BUNtail(bi, p);
-
-               *r++ = (((lng) hp) << 32) + tp;
-       }
-       BATsetcount(bn, p);
-       if (!bn->batDirty)
-               bn->batDirty = TRUE;
-
-       bn->hsorted = BAThordered(b) && (BATtordered(b) || BAThkey(b));
-       bn->hrevsorted = BAThrevordered(b) && (BATtrevordered(b) || BAThkey(b));
-       bn->tsorted = FALSE ;
-       bn->trevsorted = FALSE ;
-       bn->tdense = FALSE ;
-       BATkey(bn, BAThkey(b) || BATtkey(b)) ;
-       BATkey(BATmirror(bn), FALSE) ;
-
-       return bn;
-}
-
-static BAT *
-BATsplit(BAT *b)
-{
-       BATiter bi = bat_iterator(b);
-       BUN n = BATcount(b);
-       BAT *bn = BATnew(TYPE_oid, TYPE_oid, n);
-       BUN i;
-       lng *r = (lng *) BUNhead(bi, BUNfirst(b));
-
-       for (i = 0; i < n; i++, r++) {
-               oid hp = (int) (*r >> 32);
-               oid tp = (int) *r;
-
-               bunfastins(bn, &hp, &tp);
-       }
-
-       bn->hsorted = BAThordered(b) ;
-       bn->hrevsorted = BAThrevordered(b) ;
-       bn->tsorted = FALSE ;
-       bn->trevsorted = FALSE ;
-       bn->hdense = FALSE ;
-       bn->tdense = FALSE ;
-       bn->H->nonil = FALSE ;
-       bn->T->nonil = FALSE ;
-       BATkey(bn, FALSE) ;
-       BATkey(BATmirror(bn), FALSE) ;
-
-       return bn;
-bunins_failed:
-       BBPreclaim(bn);
-       return NULL;
-}
-
 /*
  * @- Wrapper
  * The remainder of this file contains the wrapper around the V4 code base
@@ -1225,18 +1162,6 @@ ALGhistogram(bat *result, bat *bid)
        return ALGunary(result, bid, BAThistogram, "algebra.histogram");
 }
 
-str
-ALGmerge(bat *result, bat *bid)
-{
-       return ALGunary(result, bid, BATmerge, "algebra.merge");
-}
-
-str
-ALGsplit(bat *result, bat *bid)
-{
-       return ALGunary(result, bid, BATsplit, "algebra.split");
-}
-
 static BAT *
 BATwcopy(BAT *b)
 {
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
@@ -83,8 +83,6 @@ algebra_export str ALGsubouterjoin(bat *
 algebra_export str ALGsubthetajoin(bat *r1, bat *r2, bat *l, bat *r, bat *sl, 
bat *sr, int *op, bit *nil_matches, lng *estimate);
 
 algebra_export str ALGhistogram(int *result, int *bid);
-algebra_export str ALGmerge(int *result, int *bid);
-algebra_export str ALGsplit(int *result, int *bid);
 algebra_export str ALGcopy(int *result, int *bid);
 algebra_export str ALGkunique(int *result, int *bid);
 algebra_export str ALGsunique(int *result, int *bid);
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
@@ -728,14 +728,6 @@ comment "\"grouped mark\": Produces a ne
  from b's tail. The third argument (s) gives the base value for the new
  OID sequence of each group.";
 
-command merge(b:bat[:oid,:oid]):bat[:lng,:oid]
-address ALGmerge
-comment "Merge head and tail into a single value";
-
-command split(b:bat[:lng,:oid]):bat[:oid,:oid]
-address ALGsplit
-comment "Split head into two values";
-
 # @+ BAT fragmentation commands
 # Various operations for splitting BATs into useful fragments.
 #
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to