Changeset: 8dcc01482166 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8dcc01482166
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.h
gdk/gdk_batop.c
gdk/gdk_private.h
gdk/gdk_select.c
gdk/gdk_setop.c
gdk/gdk_unique.c
monetdb5/ChangeLog.Oct2014
monetdb5/modules/kernel/algebra.c
monetdb5/modules/kernel/algebra.h
monetdb5/modules/kernel/algebra.mal
monetdb5/modules/mal/tokenizer.c
monetdb5/optimizer/opt_costModel.c
monetdb5/optimizer/opt_emptySet.c
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/tests/BugTracker/Tests/kunion-and-nil.Bug-1667.mal
monetdb5/tests/BugTracker/Tests/kunion-and-nil.Bug-1667.stable.out
monetdb5/tests/gdkTests/Tests/subgroup.mal
monetdb5/tests/gdkTests/Tests/subgroup.stable.out
sql/backends/monet5/sql_statistics.c
testing/Mtest.py.in
Branch: default
Log Message:
Merge with Oct2014 branch.
diffs (truncated from 891 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
@@ -2374,10 +2374,6 @@ command algebra.kintersect(left:bat[:any
address ALGsemijoin;
comment Returns the intersection taken over only the *head* columns of two
BATs. Results in all BUNs of 'left' that are also in 'right'.
Does *not* do double- elimination over the 'left' BUNs. If you want
this, use: 'kintersect(kunique(left),kunique(right))' or:
'kunique(kintersect(left,right))'.
-command algebra.kunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGkunique;
-comment Select unique tuples from the input BAT. Double elimination is
done only looking at the head column. The result is a BAT with
property hkeyed() == true.
-
pattern algebra.leftfetchjoinPath(l:bat[:any,:any]...):bat[:any,:any]
address ALGjoinPath;
comment Routine to handle join paths. The type analysis is rather tricky.
@@ -2659,10 +2655,6 @@ command algebra.tinter(left:bat[:oid,:oi
address ALGtinter;
command
algebra.tintersect(left:bat[:any_1,:any_2],right:bat[:any_1,:any]):bat[:any_1,:any_2]
address ALGtintersect;
-command algebra.tunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGtunique;
-comment Select unique tuples from the input BAT. Double elimination is
done over the BUNs tail. The result is a BAT with property
tkeyd()== true
-
command
algebra.thetasubselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],val:any_1,op:str):bat[:oid,:oid]
address ALGthetasubselect2;
comment Select all head values of the first input BAT for which the tail value
obeys the relation value OP VAL and for which the head value occurs in the
tail of the second input BAT. Input is a dense-headed BAT, output is a
dense-headed BAT with in the tail the head value of the input BAT for
which the relationship holds. The output BAT is sorted on the tail value.
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
@@ -2891,10 +2891,6 @@ command algebra.kintersect(left:bat[:any
address ALGsemijoin;
comment Returns the intersection taken over only the *head* columns of two
BATs. Results in all BUNs of 'left' that are also in 'right'.
Does *not* do double- elimination over the 'left' BUNs. If you want
this, use: 'kintersect(kunique(left),kunique(right))' or:
'kunique(kintersect(left,right))'.
-command algebra.kunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGkunique;
-comment Select unique tuples from the input BAT. Double elimination is
done only looking at the head column. The result is a BAT with
property hkeyed() == true.
-
pattern algebra.leftfetchjoinPath(l:bat[:any,:any]...):bat[:any,:any]
address ALGjoinPath;
comment Routine to handle join paths. The type analysis is rather tricky.
@@ -3176,10 +3172,6 @@ command algebra.tinter(left:bat[:oid,:oi
address ALGtinter;
command
algebra.tintersect(left:bat[:any_1,:any_2],right:bat[:any_1,:any]):bat[:any_1,:any_2]
address ALGtintersect;
-command algebra.tunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGtunique;
-comment Select unique tuples from the input BAT. Double elimination is
done over the BUNs tail. The result is a BAT with property
tkeyd()== true
-
command
algebra.thetasubselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],val:any_1,op:str):bat[:oid,:oid]
address ALGthetasubselect2;
comment Select all head values of the first input BAT for which the tail value
obeys the relation value OP VAL and for which the head value occurs in the
tail of the second input BAT. Input is a dense-headed BAT, output is a
dense-headed BAT with in the tail the head value of the input BAT for
which the relationship holds. The output BAT is sorted on the tail value.
diff --git a/clients/Tests/MAL-signatures_fits_geom.stable.out
b/clients/Tests/MAL-signatures_fits_geom.stable.out
--- a/clients/Tests/MAL-signatures_fits_geom.stable.out
+++ b/clients/Tests/MAL-signatures_fits_geom.stable.out
@@ -2375,10 +2375,6 @@ command algebra.kintersect(left:bat[:any
address ALGsemijoin;
comment Returns the intersection taken over only the *head* columns of two
BATs. Results in all BUNs of 'left' that are also in 'right'.
Does *not* do double- elimination over the 'left' BUNs. If you want
this, use: 'kintersect(kunique(left),kunique(right))' or:
'kunique(kintersect(left,right))'.
-command algebra.kunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGkunique;
-comment Select unique tuples from the input BAT. Double elimination is
done only looking at the head column. The result is a BAT with
property hkeyed() == true.
-
pattern algebra.leftfetchjoinPath(l:bat[:any,:any]...):bat[:any,:any]
address ALGjoinPath;
comment Routine to handle join paths. The type analysis is rather tricky.
@@ -2660,10 +2656,6 @@ command algebra.tinter(left:bat[:oid,:oi
address ALGtinter;
command
algebra.tintersect(left:bat[:any_1,:any_2],right:bat[:any_1,:any]):bat[:any_1,:any_2]
address ALGtintersect;
-command algebra.tunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGtunique;
-comment Select unique tuples from the input BAT. Double elimination is
done over the BUNs tail. The result is a BAT with property
tkeyd()== true
-
command
algebra.thetasubselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],val:any_1,op:str):bat[:oid,:oid]
address ALGthetasubselect2;
comment Select all head values of the first input BAT for which the tail value
obeys the relation value OP VAL and for which the head value occurs in the
tail of the second input BAT. Input is a dense-headed BAT, output is a
dense-headed BAT with in the tail the head value of the input BAT for
which the relationship holds. The output BAT is sorted on the tail value.
diff --git a/clients/Tests/MAL-signatures_fits_geom.stable.out.int128
b/clients/Tests/MAL-signatures_fits_geom.stable.out.int128
--- a/clients/Tests/MAL-signatures_fits_geom.stable.out.int128
+++ b/clients/Tests/MAL-signatures_fits_geom.stable.out.int128
@@ -2891,10 +2891,6 @@ command algebra.kintersect(left:bat[:any
address ALGsemijoin;
comment Returns the intersection taken over only the *head* columns of two
BATs. Results in all BUNs of 'left' that are also in 'right'.
Does *not* do double- elimination over the 'left' BUNs. If you want
this, use: 'kintersect(kunique(left),kunique(right))' or:
'kunique(kintersect(left,right))'.
-command algebra.kunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGkunique;
-comment Select unique tuples from the input BAT. Double elimination is
done only looking at the head column. The result is a BAT with
property hkeyed() == true.
-
pattern algebra.leftfetchjoinPath(l:bat[:any,:any]...):bat[:any,:any]
address ALGjoinPath;
comment Routine to handle join paths. The type analysis is rather tricky.
@@ -3176,10 +3172,6 @@ command algebra.tinter(left:bat[:oid,:oi
address ALGtinter;
command
algebra.tintersect(left:bat[:any_1,:any_2],right:bat[:any_1,:any]):bat[:any_1,:any_2]
address ALGtintersect;
-command algebra.tunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGtunique;
-comment Select unique tuples from the input BAT. Double elimination is
done over the BUNs tail. The result is a BAT with property
tkeyd()== true
-
command
algebra.thetasubselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],val:any_1,op:str):bat[:oid,:oid]
address ALGthetasubselect2;
comment Select all head values of the first input BAT for which the tail value
obeys the relation value OP VAL and for which the head value occurs in the
tail of the second input BAT. Input is a dense-headed BAT, output is a
dense-headed BAT with in the tail the head value of the input BAT for
which the relationship holds. The output BAT is sorted on the tail value.
diff --git a/clients/Tests/MAL-signatures_geom.stable.out
b/clients/Tests/MAL-signatures_geom.stable.out
--- a/clients/Tests/MAL-signatures_geom.stable.out
+++ b/clients/Tests/MAL-signatures_geom.stable.out
@@ -2375,10 +2375,6 @@ command algebra.kintersect(left:bat[:any
address ALGsemijoin;
comment Returns the intersection taken over only the *head* columns of two
BATs. Results in all BUNs of 'left' that are also in 'right'.
Does *not* do double- elimination over the 'left' BUNs. If you want
this, use: 'kintersect(kunique(left),kunique(right))' or:
'kunique(kintersect(left,right))'.
-command algebra.kunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGkunique;
-comment Select unique tuples from the input BAT. Double elimination is
done only looking at the head column. The result is a BAT with
property hkeyed() == true.
-
pattern algebra.leftfetchjoinPath(l:bat[:any,:any]...):bat[:any,:any]
address ALGjoinPath;
comment Routine to handle join paths. The type analysis is rather tricky.
@@ -2660,10 +2656,6 @@ command algebra.tinter(left:bat[:oid,:oi
address ALGtinter;
command
algebra.tintersect(left:bat[:any_1,:any_2],right:bat[:any_1,:any]):bat[:any_1,:any_2]
address ALGtintersect;
-command algebra.tunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGtunique;
-comment Select unique tuples from the input BAT. Double elimination is
done over the BUNs tail. The result is a BAT with property
tkeyd()== true
-
command
algebra.thetasubselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],val:any_1,op:str):bat[:oid,:oid]
address ALGthetasubselect2;
comment Select all head values of the first input BAT for which the tail value
obeys the relation value OP VAL and for which the head value occurs in the
tail of the second input BAT. Input is a dense-headed BAT, output is a
dense-headed BAT with in the tail the head value of the input BAT for
which the relationship holds. The output BAT is sorted on the tail value.
diff --git a/clients/Tests/MAL-signatures_geom.stable.out.int128
b/clients/Tests/MAL-signatures_geom.stable.out.int128
--- a/clients/Tests/MAL-signatures_geom.stable.out.int128
+++ b/clients/Tests/MAL-signatures_geom.stable.out.int128
@@ -2891,10 +2891,6 @@ command algebra.kintersect(left:bat[:any
address ALGsemijoin;
comment Returns the intersection taken over only the *head* columns of two
BATs. Results in all BUNs of 'left' that are also in 'right'.
Does *not* do double- elimination over the 'left' BUNs. If you want
this, use: 'kintersect(kunique(left),kunique(right))' or:
'kunique(kintersect(left,right))'.
-command algebra.kunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGkunique;
-comment Select unique tuples from the input BAT. Double elimination is
done only looking at the head column. The result is a BAT with
property hkeyed() == true.
-
pattern algebra.leftfetchjoinPath(l:bat[:any,:any]...):bat[:any,:any]
address ALGjoinPath;
comment Routine to handle join paths. The type analysis is rather tricky.
@@ -3176,10 +3172,6 @@ command algebra.tinter(left:bat[:oid,:oi
address ALGtinter;
command
algebra.tintersect(left:bat[:any_1,:any_2],right:bat[:any_1,:any]):bat[:any_1,:any_2]
address ALGtintersect;
-command algebra.tunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGtunique;
-comment Select unique tuples from the input BAT. Double elimination is
done over the BUNs tail. The result is a BAT with property
tkeyd()== true
-
command
algebra.thetasubselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],val:any_1,op:str):bat[:oid,:oid]
address ALGthetasubselect2;
comment Select all head values of the first input BAT for which the tail value
obeys the relation value OP VAL and for which the head value occurs in the
tail of the second input BAT. Input is a dense-headed BAT, output is a
dense-headed BAT with in the tail the head value of the input BAT for
which the relationship holds. The output BAT is sorted on the tail value.
diff --git a/clients/Tests/MAL-signatures_none.stable.out
b/clients/Tests/MAL-signatures_none.stable.out
--- a/clients/Tests/MAL-signatures_none.stable.out
+++ b/clients/Tests/MAL-signatures_none.stable.out
@@ -2374,10 +2374,6 @@ command algebra.kintersect(left:bat[:any
address ALGsemijoin;
comment Returns the intersection taken over only the *head* columns of two
BATs. Results in all BUNs of 'left' that are also in 'right'.
Does *not* do double- elimination over the 'left' BUNs. If you want
this, use: 'kintersect(kunique(left),kunique(right))' or:
'kunique(kintersect(left,right))'.
-command algebra.kunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGkunique;
-comment Select unique tuples from the input BAT. Double elimination is
done only looking at the head column. The result is a BAT with
property hkeyed() == true.
-
pattern algebra.leftfetchjoinPath(l:bat[:any,:any]...):bat[:any,:any]
address ALGjoinPath;
comment Routine to handle join paths. The type analysis is rather tricky.
@@ -2659,10 +2655,6 @@ command algebra.tinter(left:bat[:oid,:oi
address ALGtinter;
command
algebra.tintersect(left:bat[:any_1,:any_2],right:bat[:any_1,:any]):bat[:any_1,:any_2]
address ALGtintersect;
-command algebra.tunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGtunique;
-comment Select unique tuples from the input BAT. Double elimination is
done over the BUNs tail. The result is a BAT with property
tkeyd()== true
-
command
algebra.thetasubselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],val:any_1,op:str):bat[:oid,:oid]
address ALGthetasubselect2;
comment Select all head values of the first input BAT for which the tail value
obeys the relation value OP VAL and for which the head value occurs in the
tail of the second input BAT. Input is a dense-headed BAT, output is a
dense-headed BAT with in the tail the head value of the input BAT for
which the relationship holds. The output BAT is sorted on the tail value.
diff --git a/clients/Tests/MAL-signatures_none.stable.out.int128
b/clients/Tests/MAL-signatures_none.stable.out.int128
--- a/clients/Tests/MAL-signatures_none.stable.out.int128
+++ b/clients/Tests/MAL-signatures_none.stable.out.int128
@@ -2889,10 +2889,6 @@ command algebra.kintersect(left:bat[:any
address ALGsemijoin;
comment Returns the intersection taken over only the *head* columns of two
BATs. Results in all BUNs of 'left' that are also in 'right'.
Does *not* do double- elimination over the 'left' BUNs. If you want
this, use: 'kintersect(kunique(left),kunique(right))' or:
'kunique(kintersect(left,right))'.
-command algebra.kunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGkunique;
-comment Select unique tuples from the input BAT. Double elimination is
done only looking at the head column. The result is a BAT with
property hkeyed() == true.
-
pattern algebra.leftfetchjoinPath(l:bat[:any,:any]...):bat[:any,:any]
address ALGjoinPath;
comment Routine to handle join paths. The type analysis is rather tricky.
@@ -3174,10 +3170,6 @@ command algebra.tinter(left:bat[:oid,:oi
address ALGtinter;
command
algebra.tintersect(left:bat[:any_1,:any_2],right:bat[:any_1,:any]):bat[:any_1,:any_2]
address ALGtintersect;
-command algebra.tunique(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
-address ALGtunique;
-comment Select unique tuples from the input BAT. Double elimination is
done over the BUNs tail. The result is a BAT with property
tkeyd()== true
-
command
algebra.thetasubselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],val:any_1,op:str):bat[:oid,:oid]
address ALGthetasubselect2;
comment Select all head values of the first input BAT for which the tail value
obeys the relation value OP VAL and for which the head value occurs in the
tail of the second input BAT. Input is a dense-headed BAT, output is a
dense-headed BAT with in the tail the head value of the input BAT for
which the relationship holds. The output BAT is sorted on the tail value.
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
@@ -143,7 +143,6 @@ BAT *BATkdiff(BAT *b, BAT *c);
BAT *BATkey(BAT *b, int onoff);
BAT *BATkintersect(BAT *b, BAT *c);
BAT *BATkunion(BAT *b, BAT *c);
-BAT *BATkunique(BAT *b);
BAT *BATleftfetchjoin(BAT *b, BAT *s, BUN estimate);
BAT *BATleftjoin(BAT *l, BAT *r, BUN estimate);
BAT *BATmark(BAT *b, oid base);
@@ -764,7 +763,6 @@ BAT *ALGjoinPathBody(Client cntxt, int t
str ALGjoinestimate(int *result, int *lid, int *rid, lng *estimate);
str ALGkdiff(int *result, int *lid, int *rid);
str ALGkunion(int *result, int *lid, int *rid);
-str ALGkunique(int *result, int *bid);
str ALGleftfetchjoin(int *result, int *lid, int *rid);
str ALGleftjoin(int *result, int *lid, int *rid);
str ALGleftjoinestimate(int *result, int *lid, int *rid, lng *estimate);
@@ -833,7 +831,6 @@ str ALGtmarkp(int *result, int *bid, int
str ALGtsort(int *result, int *bid);
str ALGtsort_rev(int *result, int *bid);
str ALGtunion(int *result, int *lid, int *rid);
-str ALGtunique(int *result, int *bid);
str ALGuselect(int *result, int *bid, ptr low, ptr high);
str ALGuselect1(int *result, int *bid, ptr value);
str ALGuselectInclusive(int *result, int *bid, ptr low, ptr high, bit *lin,
bit *rin);
@@ -2412,7 +2409,6 @@ str jsonRef;
str kdifferenceRef;
int keepProp;
str kunionRef;
-str kuniqueRef;
str languageRef;
str lastline(Client cntxt);
str leftfetchjoinPathRef;
@@ -2793,7 +2789,6 @@ void trimMalBlk(MalBlkPtr mb);
void trimMalVariables(MalBlkPtr mb, MalStkPtr stk);
void trimMalVariables_(MalBlkPtr mb, bit *used, MalStkPtr glb);
int tubProp;
-str tuniqueRef;
void typeChecker(stream *out, Module scope, MalBlkPtr mb, InstrPtr p, int
silent);
int tzone_fromstr(const char *buf, int *len, tzone **d);
tzone tzone_local;
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -3239,8 +3239,6 @@ gdk_export void BATsetprop(BAT *b, int i
* @tab BATfragment (BAT *b, ptr l, ptr h, ptr L, ptr H)
* @item
* @item BAT *
- * @tab BATkunique (BAT *b)
- * @item BAT *
* @tab BATkunion (BAT *b, BAT *c)
* @item BAT *
* @tab BATkintersect (BAT *b, BAT *c)
@@ -3275,9 +3273,6 @@ gdk_export void BATsetprop(BAT *b, int i
* implementations. TODO: add this for
* semijoin/select/unique/diff/intersect
*
- * The routine BATtunique considers only the head column, and produces
- * a unique head column.
- *
* @- modes for thethajoin
*/
#define JOIN_EQ 0
@@ -3324,7 +3319,6 @@ gdk_export BAT *BATleftfetchjoin(BAT *b,
gdk_export BAT *BATsubunique(BAT *b, BAT *s);
-gdk_export BAT *BATkunique(BAT *b);
gdk_export BAT *BATkintersect(BAT *b, BAT *c);
gdk_export BAT *BATkunion(BAT *b, BAT *c);
gdk_export BAT *BATkdiff(BAT *b, BAT *c);
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -2043,18 +2043,7 @@ BATmergecand(BAT *a, BAT *b)
bn->tkey = 1;
bn->T->nil = 0;
bn->T->nonil = 1;
- af = * (const oid *) Tloc(bn, BUNfirst(bn));
- if (af + BATcount(bn) - 1 == *(const oid *) Tloc(bn, BUNlast(bn) - 1)) {
- /* new bat is in fact dense, replace by void column */
- bn->tseqbase = af;
- bn->tdense = 1;
- HEAPfree(&bn->T->heap);
- bn->ttype = TYPE_void;
- bn->tvarsized = 1;
- bn->T->width = 0;
- bn->T->shift = 0;
- }
- return bn;
+ return virtualize(bn);
}
/* intersect two candidate lists and produce a new one
@@ -2144,17 +2133,5 @@ BATintersectcand(BAT *a, BAT *b)
bn->tkey = 1;
bn->T->nil = 0;
bn->T->nonil = 1;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list