Changeset: 56c6683b76b4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=56c6683b76b4
Modified Files:
gdk/gdk_select.c
Branch: Oct2014
Log Message:
Simplified expressions.
diffs (26 lines):
diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -1377,10 +1377,11 @@ BATsubselect(BAT *b, BAT *s, const void
}
/* refine upper limit by exact size (if known) */
maximum = MIN(maximum, estimate);
- hash = b->batPersistence == PERSISTENT &&
+ hash = equi &&
+ b->batPersistence == PERSISTENT &&
(size_t) ATOMsize(b->ttype) > sizeof(BUN) / 4 &&
BATcount(b) * (ATOMsize(b->ttype) + 2 * sizeof(BUN)) <
GDK_mem_maxsize / 2;
- if (estimate == BUN_NONE && equi && !b->T->hash && hash) {
+ 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) {
@@ -1417,7 +1418,7 @@ BATsubselect(BAT *b, BAT *s, const void
estimate = (BATcount(b) / 100) - 1;
}
}
- hash = hash && estimate < BATcount(b) / 100;
+ hash = estimate < BATcount(b) / 100;
}
if (estimate == BUN_NONE) {
/* no better estimate possible/required:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list