Changeset: ccc332164c0f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ccc332164c0f Modified Files: sql/storage/bat/bat_storage.c Branch: default Log Message:
Merge with Jan2022 branch. diffs (109 lines): diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c --- a/gdk/gdk_join.c +++ b/gdk/gdk_join.c @@ -3173,8 +3173,8 @@ count_unique(BAT *b, BAT *s, BUN *cnt1, mask = (BUN) 1 << 16; if ((hs.heaplink.farmid = BBPselectfarm(TRANSIENT, b->ttype, hashheap)) < 0 || (hs.heapbckt.farmid = BBPselectfarm(TRANSIENT, b->ttype, hashheap)) < 0 || - snprintf(hs.heaplink.filename, sizeof(hs.heaplink.filename), "%s.thshunil%x", nme, (unsigned) THRgettid()) >= (int) sizeof(hs.heaplink.filename) || - snprintf(hs.heapbckt.filename, sizeof(hs.heapbckt.filename), "%s.thshunib%x", nme, (unsigned) THRgettid()) >= (int) sizeof(hs.heapbckt.filename) || + snprintf(hs.heaplink.filename, sizeof(hs.heaplink.filename), "%s.thshjnl%x", nme, (unsigned) THRgettid()) >= (int) sizeof(hs.heaplink.filename) || + snprintf(hs.heapbckt.filename, sizeof(hs.heapbckt.filename), "%s.thshjnb%x", nme, (unsigned) THRgettid()) >= (int) sizeof(hs.heapbckt.filename) || HASHnew(&hs, b->ttype, BUNlast(b), mask, BUN_NONE, false) != GDK_SUCCEED) { GDKerror("cannot allocate hash table\n"); HEAPfree(&hs.heaplink, true); diff --git a/monetdb5/ChangeLog.Jan2022 b/monetdb5/ChangeLog.Jan2022 --- a/monetdb5/ChangeLog.Jan2022 +++ b/monetdb5/ChangeLog.Jan2022 @@ -1,3 +1,7 @@ # ChangeLog file for MonetDB5 # This file is updated with Maddlog +* Wed Dec 15 2021 Pedro Ferreira <pedro.ferre...@monetdbsolutions.com> +- The storage cleanup in the 11.41.5 (Jul2021) release made the OLTP + optimizer pipeline absolete, thus it was removed. + diff --git a/monetdb5/optimizer/opt_fastpath.c b/monetdb5/optimizer/opt_fastpath.c --- a/monetdb5/optimizer/opt_fastpath.c +++ b/monetdb5/optimizer/opt_fastpath.c @@ -52,7 +52,7 @@ if ((msg = OPT(cntxt, mb, stk, pci)) != MAL_SUCCEED) \ goto bailout; \ actions += *(int*)getVarValue(mb, getArg(pci, pci->argc - 1)); \ - pci->argc--; /* keep number of argc low, so 'pci' is not reallocated */ \ + delArgument(pci, pci->argc - 1); /* keep number of argc low, so 'pci' is not reallocated */ \ } \ } while (0) diff --git a/sql/ChangeLog.Jan2022 b/sql/ChangeLog.Jan2022 --- a/sql/ChangeLog.Jan2022 +++ b/sql/ChangeLog.Jan2022 @@ -6,6 +6,11 @@ statement was updated to accomodate those changes. The SAMPLE parameter is now ignored because ANALYZE generated statistics used by relational operators, are required to be precise. +- In order to mitigate the I/O required to update the 'statistics' table, + this table is no longer persisted. Alternately, it was changed into a + computed view every time when queried. The 'stamp' and 'sample' fields + were removed for the aforementioned reasons. The 'schema', 'table' and + 'column' fields were added for convenience. * Mon Dec 6 2021 Sjoerd Mullender <sjo...@acm.org> - In previous versions there was no check that the INCREMENT BY value of diff --git a/sql/backends/monet5/UDF/pyapi3/pyapi3.c b/sql/backends/monet5/UDF/pyapi3/pyapi3.c --- a/sql/backends/monet5/UDF/pyapi3/pyapi3.c +++ b/sql/backends/monet5/UDF/pyapi3/pyapi3.c @@ -203,10 +203,10 @@ static str PyAPIeval(Client cntxt, MalBl // If the first input argument is of type lng, this is a cardinality-only bulk operation. int has_card_arg = 0; - lng card; // cardinality of non-bat inputs + BUN card; // cardinality of non-bat inputs if (getArgType(mb, pci, pci->retc) == TYPE_lng) { has_card_arg=1; - card = *getArgReference_lng(stk, pci, pci->retc); + card = (BUN) *getArgReference_lng(stk, pci, pci->retc); } else { has_card_arg=0; diff --git a/sql/backends/monet5/sql_statistics.c b/sql/backends/monet5/sql_statistics.c --- a/sql/backends/monet5/sql_statistics.c +++ b/sql/backends/monet5/sql_statistics.c @@ -329,8 +329,8 @@ sql_statistics(Client cntxt, MalBlkPtr m } BATiter bi = bat_iterator(fb); - if (fb->tminpos != BUN_NONE) { - if (tostr(&buf, &buflen, BUNtail(bi, fb->tminpos), false) < 0) { + if (bi.minpos != BUN_NONE) { + if (tostr(&buf, &buflen, BUNtail(bi, bi.minpos), false) < 0) { bat_iterator_end(&bi); BBPunfix(fb->batCacheid); msg = createException(SQL, "sql.statistics", SQLSTATE(HY013) MAL_MALLOC_FAIL); @@ -346,8 +346,8 @@ sql_statistics(Client cntxt, MalBlkPtr m goto bailout; } - if (fb->tmaxpos != BUN_NONE) { - if (tostr(&buf, &buflen, BUNtail(bi, fb->tmaxpos), false) < 0) { + if (bi.maxpos != BUN_NONE) { + if (tostr(&buf, &buflen, BUNtail(bi, bi.maxpos), false) < 0) { bat_iterator_end(&bi); BBPunfix(fb->batCacheid); msg = createException(SQL, "sql.statistics", SQLSTATE(HY013) MAL_MALLOC_FAIL); diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c --- a/sql/storage/bat/bat_storage.c +++ b/sql/storage/bat/bat_storage.c @@ -2342,9 +2342,9 @@ min_max_col(sql_trans *tr, sql_column *c _DELETE(c->max); if ((d = ATOMIC_PTR_GET(&c->data)) && (b = temp_descriptor(d->cs.bid))) { BATiter bi = bat_iterator(b); - if (b->tminpos != BUN_NONE && b->tmaxpos != BUN_NONE) { - void *nmin = BUNtail(bi, b->tminpos), *nmax = BUNtail(bi, b->tmaxpos); - size_t minlen = ATOMlen(b->ttype, nmin), maxlen = ATOMlen(b->ttype, nmax); + if (bi.minpos != BUN_NONE && bi.maxpos != BUN_NONE) { + void *nmin = BUNtail(bi, bi.minpos), *nmax = BUNtail(bi, bi.maxpos); + size_t minlen = ATOMlen(bi.type, nmin), maxlen = ATOMlen(bi.type, nmax); if (!(c->min = GDKmalloc(minlen)) || !(c->max = GDKmalloc(maxlen))) { _DELETE(c->min); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list