Changeset: 9fde013ac092 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9fde013ac092
Modified Files:
        gdk/gdk_select.c
Branch: default
Log Message:

Merge with Oct2014 branch.


diffs (24 lines):

diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -1483,7 +1483,10 @@ BATsubselect(BAT *b, BAT *s, const void 
        if (hash && estimate == BUN_NONE && !b->T->hash) {
                /* no exact result size, but we need estimate to choose
                 * between hash- & scan-select */
-               if (BATcount(b) <= 10000) {
+               BUN cnt = BATcount(b);
+               if (s && BATcount(s) < cnt)
+                       cnt = BATcount(s);
+               if (cnt <= 10000) {
                        /* "small" input: don't bother about more accurate
                         * estimate */
                        estimate = maximum;
@@ -1517,7 +1520,7 @@ BATsubselect(BAT *b, BAT *s, const void 
                                estimate = (BATcount(b) / 100) - 1;
                        }
                }
-               hash = estimate < BATcount(b) / 100;
+               hash = estimate < cnt / 100;
        }
        if (estimate == BUN_NONE) {
                /* no better estimate possible/required:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to