Changeset: 4d5dfc1a4dfc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4d5dfc1a4dfc
Branch: octbugs
Log Message:
Merge with Oct2020 branch.
diffs (60 lines):
diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -102,6 +102,9 @@ joinparamcheck(BAT *l, BAT *r1, BAT *r2,
return GDK_SUCCEED;
}
+#define INCRSIZELOG (8 + (SIZEOF_OID / 2))
+#define INCRSIZE (1 << INCRSIZELOG)
+
/* Create the result bats for a join, returns the absolute maximum
* number of outputs that could possibly be generated. */
static BUN
@@ -153,8 +156,8 @@ joininitresults(BAT **r1p, BAT **r2p, BU
maxsize = BUN_MAX;
}
size = estimate == BUN_NONE ? lcnt < rcnt ? lcnt : rcnt : estimate;
- if (size < 1024)
- size = 1024;
+ if (size < INCRSIZE)
+ size = INCRSIZE;
if (size > maxsize)
size = maxsize;
if ((rkey | semi | only_misses) & nil_on_miss) {
@@ -221,14 +224,17 @@ maybeextend(BAT *restrict r1, BAT *restr
BUN cnt, BUN lcur, BUN lcnt, BUN maxsize)
{
if (BATcount(r1) + cnt > BATcapacity(r1)) {
- /* make some extra space by extrapolating how much
- * more we need (fraction of l we've seen so far is
- * used to estimate a new size but with a shallow
- * slope so that a skewed join doesn't overwhelm) */
+ /* make some extra space by extrapolating how much more
+ * we need (fraction of l we've seen so far is used to
+ * estimate a new size but with a shallow slope so that
+ * a skewed join doesn't overwhelm, whilst making sure
+ * there is somewhat significant progress) */
BUN newcap = (BUN) (lcnt / (lcnt / 4.0 + lcur * .75) *
(BATcount(r1) + cnt));
+ newcap = (newcap + INCRSIZE - 1) & ~(((BUN) 1 << INCRSIZELOG) -
1);
if (newcap < cnt + BATcount(r1))
- newcap = cnt + BATcount(r1) + 1024;
- if (newcap > maxsize)
+ newcap = cnt + BATcount(r1) + INCRSIZE;
+ /* if close to maxsize, then just use maxsize */
+ if (newcap + INCRSIZE > maxsize)
newcap = maxsize;
/* make sure heap.free is set properly before
* extending */
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -74,7 +74,7 @@ endif(HAVE_LIBZ)
if (HAVE_NETCDF)
set(HAVE_NETCDF_FALSE "#")
endif(HAVE_NETCDF)
-if (HAVE_ODBC)
+if (ODBC_FOUND)
set(HAVE_ODBC_FALSE "#")
endif(HAVE_ODBC)
if (HAVE_PROJ)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list