Changeset: 0afc967c2645 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0afc967c2645
Modified Files:
        gdk/gdk_group.c
Branch: Jul2017
Log Message:

Fix offset in extents result of BATgroup when using parent hash.


diffs (42 lines):

diff --git a/gdk/gdk_group.c b/gdk/gdk_group.c
--- a/gdk/gdk_group.c
+++ b/gdk/gdk_group.c
@@ -88,7 +88,7 @@
                        }                                               \
                }                                                       \
                if (extents)                                            \
-                       exts[ngrp] = hseqb + p;                         \
+                       exts[ngrp] = hseqb + p - lo;                    \
                if (histo)                                              \
                        cnts[ngrp] = 1;                                 \
                ngrps[r] = ngrp++;                                      \
@@ -545,6 +545,7 @@ BATgroup_internal(BAT **groups, BAT **ex
        bat parent;
 #endif
        BUN start, end, cnt;
+       BUN lo = 0;
        const oid *restrict cand, *candend;
        oid maxgrp = oid_nil;   /* maximum value of g BAT (if subgrouping) */
        PROPrec *prop;
@@ -1006,8 +1007,6 @@ BATgroup_internal(BAT **groups, BAT **ex
                       BATcheckhash(BBPdescriptor(parent)))
 #endif
                ) {
-               BUN lo;
-
                /* we already have a hash table on b, or b is
                 * persistent and we could create a hash table, or b
                 * is a view on a bat that already has a hash table */
@@ -1034,11 +1033,8 @@ BATgroup_internal(BAT **groups, BAT **ex
                        bi = bat_iterator(b);
                        start += lo;
                        end += lo;
-               } else
+               }
 #endif
-               {
-                       lo = 0;
-               }
                hs = b->thash;
                gn->tsorted = 1; /* be optimistic */
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to