Changeset: fe54d935cb9a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fe54d935cb9a
Modified Files:
        monetdb5/modules/kernel/group.mx
Branch: Apr2011
Log Message:

avoid useless group.derive() in more cases,
i.e.,
not only in case the tail of the map-BAT is (marked as) key (unique),
but also in case the extend-BAT already contains as many groups as there are 
tuples
(conservatively handle the case that map-BAT and value-BAT are not of same 
length;
 although it is not clear whether that case can occur at all ...)


diffs (14 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,9 @@
                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) {
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to