Changeset: f84a8766ba1c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f84a8766ba1c
Modified Files:
gdk/gdk_batop.mx
Branch: default
Log Message:
Merge with Apr2011 branch.
diffs (115 lines):
diff --git a/gdk/gdk_batop.mx b/gdk/gdk_batop.mx
--- a/gdk/gdk_batop.mx
+++ b/gdk/gdk_batop.mx
@@ -562,6 +562,8 @@
b->T->vheap->hashash == n->T->vheap->hashash &&
VIEWtparent(n) == 0) {
b = insert_string_bat(b, n, 1);
+ if (b == NULL)
+ return NULL;
} else if (b->htype == TYPE_void) {
BATiter ni = bat_iterator(n);
diff --git a/monetdb5/modules/kernel/group.mx b/monetdb5/modules/kernel/group.mx
--- a/monetdb5/modules/kernel/group.mx
+++ b/monetdb5/modules/kernel/group.mx
@@ -299,10 +299,19 @@
and 2-byte values by using direct mapping in an array instead of
hashing.
@c
+#if SIZEOF_BUN == SIZEOF_INT
+#define mix_BUN(v) mix_int(v)
+#else
+#define mix_BUN(v) mix_int((v)^((v)>>31))
+#endif
#define HASH_bte(p) ((BUN) (*(unsigned char*) (p)))
#define HASH_sht(p) ((BUN) (*(unsigned short*) (p)))
-#define HASH_int(p) ((BUN) *(unsigned int*) (p))
-#define HASH_lng(p) ((BUN)(((unsigned int*)(p))[0]^((unsigned int*)(p))[1]))
+#define HASH_int(p) ((BUN) (*(unsigned int*) (p)))
+#if SIZEOF_BUN == SIZEOF_LNG
+#define HASH_lng(p) ((BUN) (*(BUN *) (p)))
+#else
+#define HASH_lng(p) ((BUN) (((unsigned int*)(p))[0]^((unsigned int*)(p))[1]))
+#endif
#define HASH_str_hv(p) (((BUN *) (p))[-1])
#define HASH_any(p) ((*hashfcn)(p))
@@ -476,7 +485,7 @@
/* hash-lookup of 'tcur' in map */
BUN c = HASH_@1(tcur);
- c = mix_int(c) & mask;
+ c = mix_BUN(c) & mask;
chain_@4 {
r = zz;
e = (mapentry_t*) BUNhloc(mapi,r);
@@ -818,8 +827,8 @@
hcur = *(oid*) BUNtloc(ct_mapi,cp);
/* hash-lookup of [hcur,tcur] in map */
- c = (((BUN) hcur) ^ HASH_@2(tcur));
- c = mix_int(c) & mask;
+ c = (((BUN) hcur) ^ mix_BUN(HASH_@2(tcur)));
+ c = mix_BUN(c) & mask;
chain_@5 {
r = zz;
e = (mapentry_t*) Hloc(map,r);
@@ -1277,7 +1286,19 @@
b->batCacheid, ATOMname(b->htype), ATOMname(b->ttype),
BATcount(b),
tt);
- if (!ct_map->tkey) { /* cannot derive more groups */
+ if (ct_map->tkey ||
+ BATcount(ct_histo) >= MAX(BATcount(ct_map),BATcount(b))) {
+ /* cannot derive more groups */
+ bn = ct_map;
+ histo = ct_histo;
+ if (!synced) {
+ bn = BATsemijoin(ct_map, b);
+ histo = BATsemijoin(ct_histo, BATmirror(bn));
+ } else {
+ BBPfix(ct_map->batCacheid);
+ BBPfix(ct_histo->batCacheid);
+ }
+ } else {
if (synced &&
!BATtkey(b) &&
BAThdense(b) &&
@@ -1382,16 +1403,6 @@
BATkey(bn, TRUE);
}
- } else {
- bn = ct_map;
- histo = ct_histo;
- if (!synced) {
- bn = BATsemijoin(ct_map, b);
- histo = BATsemijoin(ct_histo, BATmirror(bn));
- } else {
- BBPfix(ct_map->batCacheid);
- BBPfix(ct_histo->batCacheid);
- }
}
*M = bn;
*H = histo;
diff --git a/monetdb5/modules/mal/attach.mx b/monetdb5/modules/mal/attach.mx
--- a/monetdb5/modules/mal/attach.mx
+++ b/monetdb5/modules/mal/attach.mx
@@ -21,13 +21,13 @@
@a Martin Kersten
@v 0.1
@+ Attach
-The attach module provides a mechanism to easily share a (readonly)
+The attach module provides a mechanism to easily share (readonly)
BATs between two mservers.
The module is intended to support cheap attachment of BATs identified
using several protocols, but for the moment we assume a single Linux
-cluster with NSF.
-In this context the bind() creates a symbolic link.
+cluster with NFS.
+In this context the bind() creates a symbolic link.
Beware that the argument to the patterns is the full path to
the base of the BAT. Depending on their type we need to
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list