Changeset: dda2f53b8b08 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dda2f53b8b08
Modified Files:
monetdb5/modules/kernel/group.mx
Branch: Apr2011
Log Message:
more intiutive code order: handle special case first
and thus ensure that comment indeed matches code
diffs (39 lines):
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
@@ -1286,7 +1286,17 @@
b->batCacheid, ATOMname(b->htype), ATOMname(b->ttype),
BATcount(b),
tt);
- if (!ct_map->tkey) { /* cannot derive more groups */
+ if (ct_map->tkey) { /* 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) &&
@@ -1391,16 +1401,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;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list