Changeset: 1976120a95df for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1976120a95df
Modified Files:
Branch: Jun2010
Log Message:
Merge heads.
diffs (144 lines):
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr.mx
--- a/MonetDB5/src/modules/kernel/aggr.mx Mon Jul 05 10:19:56 2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr.mx Mon Jul 05 10:44:53 2010 +0200
@@ -196,11 +196,15 @@
@-
In case the head of the group extend (e) is sorted, we assume that also the
-the tail of group map (g) "almost" sorted --- or at least clustered such
-that group IDs in cluster i are smaller than those in cluster i+1; this is
-the case if the first grouping attribute (column/BAT) is sorted --- and
-resorted to "local scanning" rather than (inherently random and expensive)
-hash-lookups.
+the tail of the group map (g) is "almost" sorted or "mostly ascending" ---
+or at least clustered such that group IDs in cluster i are smaller than
+those in cluster i+1; this is the case if the first grouping attribute
+(column/BAT) is sorted --- and resorted to "local scanning" rather than
+(inherently random and expensive) hash-lookups.
+Lacking a suitable and efficient way to detect that the tail of the group
+map (g) is "almost sorted" or "mostly ascending", we require that the tail
+of the group map (g) is sorted --- the "local scanning" performs much worse
+than hash-lookups in case the tail of the group map (g) is in random order.
@h
#define MERGE_aggr_init \
BUN _i = 0, _j = BATcount(bn), _r = BUNfirst(bn); \
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr_be_avg.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_avg.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_avg.mx Mon Jul 05 10:44:53
2010 +0200
@@ -236,7 +236,7 @@
} else {
@:aggrX3_avg(0,0,SCANfndOID,loc,BUNhloc(bi,p),@1,@2,b...@2(bni,r),r-off)@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(b)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df
MonetDB5/src/modules/kernel/aggr_be_count.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_count.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_count.mx Mon Jul 05 10:44:53
2010 +0200
@@ -232,7 +232,7 @@
} else {
@:aggrX3_count(0,0,SCANfndOID,loc,BUNhloc(bi,p),BUNtloc(bni,r))@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(b)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df
MonetDB5/src/modules/kernel/aggr_be_minmax.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_minmax.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_minmax.mx Mon Jul 05 10:44:53
2010 +0200
@@ -293,7 +293,7 @@
} else {
@:aggrx3_minm...@5(@2,0,SCANfndOID,loc,BUNhloc(bi,p),@3,@4,r-off,@6)@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(b)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr_be_prod.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_prod.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_prod.mx Mon Jul 05 10:44:53
2010 +0200
@@ -234,7 +234,7 @@
} else {
@:aggrX3_prod(0,0,SCANfndOID,loc,BUNhloc(bi,p),@1,@2,b...@2(bni,r),@3,r-off)@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(b)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr_be_sum.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_sum.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_sum.mx Mon Jul 05 10:44:53
2010 +0200
@@ -232,7 +232,7 @@
} else {
@:aggrX3_sum(0,0,SCANfndOID,loc,BUNhloc(bi,p),@1,@2,b...@2(bni,r),@3,r-off)@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(b)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr_bge_avg.mx
--- a/MonetDB5/src/modules/kernel/aggr_bge_avg.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_bge_avg.mx Mon Jul 05 10:44:53
2010 +0200
@@ -279,7 +279,7 @@
} else {
@:aggrX3_avg3(0,0,SCANfndOID,loc,BUNhloc(bi,p),@1,@2,b...@2(bni,r),r-off)@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(g)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df
MonetDB5/src/modules/kernel/aggr_bge_count.mx
--- a/MonetDB5/src/modules/kernel/aggr_bge_count.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_bge_count.mx Mon Jul 05 10:44:53
2010 +0200
@@ -268,7 +268,7 @@
} else {
@:aggrX3_count3(0,0,SCANfndOID,loc,BUNhloc(bi,p),BUNtloc(bni,r))@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(g)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df
MonetDB5/src/modules/kernel/aggr_bge_minmax.mx
--- a/MonetDB5/src/modules/kernel/aggr_bge_minmax.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_bge_minmax.mx Mon Jul 05 10:44:53
2010 +0200
@@ -361,7 +361,7 @@
} else {
@:aggrx3_minma...@5(@2,0,SCANfndOID,loc,BUNhloc(bi,p),@3,@4,r-off,@6)@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(g)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df
MonetDB5/src/modules/kernel/aggr_bge_prod.mx
--- a/MonetDB5/src/modules/kernel/aggr_bge_prod.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_bge_prod.mx Mon Jul 05 10:44:53
2010 +0200
@@ -320,7 +320,7 @@
} else {
@:aggrX3_prod3(0,0,SCANfndOID,loc,BUNhloc(bi,p),@1,BUNtloc(bni,r),if (w >= base
&& w < end),@2,r-off)@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(g)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr_bge_sum.mx
--- a/MonetDB5/src/modules/kernel/aggr_bge_sum.mx Mon Jul 05 10:19:56
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_bge_sum.mx Mon Jul 05 10:44:53
2010 +0200
@@ -316,7 +316,7 @@
} else {
@:aggrX3_sum3(0,0,SCANfndOID,loc,BUNhloc(bi,p),@1,BUNtloc(bni,r),if (w >= base
&& w < end),@2,r-off)@
}
- } else if (BAThordered(e)&1) {
+ } else if (BATtordered(g)&BAThordered(e)&1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list