MonetDB: nested - small fix check if composite
Changeset: 5b91c98645b8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5b91c98645b8 Modified Files: sql/backends/monet5/sql.c Branch: nested Log Message: small fix check if composite diffs (14 lines): diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -5850,7 +5850,9 @@ insert_json_array(char **msg, JSON *js, n = t->type->d.fields->h; if (n) { sql_arg *a = n->data; - t = &a->type; + sql_subtype *atype = &a->type; + if (atype->type->composite) + t = atype; } elm = insert_json_object(msg, js, bats, bat_offset + 1, nr, elm, id, anr++, t); (void)oanr; // outer array number ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: nested - fix json loader
Changeset: 6a653021571d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6a653021571d Modified Files: sql/backends/monet5/vaults/json/json.c Branch: nested Log Message: fix json loader diffs (24 lines): diff --git a/sql/backends/monet5/vaults/json/json.c b/sql/backends/monet5/vaults/json/json.c --- a/sql/backends/monet5/vaults/json/json.c +++ b/sql/backends/monet5/vaults/json/json.c @@ -116,10 +116,19 @@ append_terms(allocator *sa, JSON *jt, si break; case JSON_OBJECT: v = sa_strndup(sa, t->value, t->valuelen); + int depth = 0; do { offset += 1; next = offset < (size_t)jt->free ? jt->elm + offset : NULL; - } while((next && next->kind != JSON_VALUE)); + prev = jt->elm + (offset - 1); + if ((next && next->kind == JSON_OBJECT) && prev->kind == JSON_ELEMENT) + depth += 1; + if (next && next->kind == JSON_VALUE) { + depth -= 1; + } + if (next && next->kind == JSON_VALUE && prev->kind == JSON_VALUE) + depth = 0; + } while((next && next->kind != JSON_VALUE) || (next && depth > 0)); break; case JSON_ELEMENT: case JSON_STRING: ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Fix some data races.
Changeset: 7ae70245e678 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/7ae70245e678 Modified Files: gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_heap.c gdk/gdk_join.c gdk/gdk_logger.c gdk/gdk_sample.c gdk/gdk_system.c sql/backends/monet5/sql_scenario.c sql/storage/bat/bat_storage.c sql/storage/sql_storage.h sql/storage/store.c Branch: Aug2024 Log Message: Fix some data races. diffs (truncated from 564 to 300 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -1122,6 +1122,7 @@ BUNappendmulti(BAT *b, const void *value VALcopy(&maxprop, prop) != NULL) maxbound = VALptr(&maxprop); const bool notnull = BATgetprop_nolock(b, GDK_NOT_NULL) != NULL; + bool setnil = false; MT_lock_unset(&b->theaplock); MT_rwlock_wrlock(&b->thashlock); if (values && b->ttype) { @@ -1201,8 +1202,7 @@ BUNappendmulti(BAT *b, const void *value } } } else { - b->tnil = true; - b->tnonil = false; + setnil = true; } p++; } @@ -1222,8 +1222,7 @@ BUNappendmulti(BAT *b, const void *value } else if (ATOMstorage(b->ttype) == TYPE_msk) { bi.minpos = bi.maxpos = BUN_NONE; minvalp = maxvalp = NULL; - b->tnil = false; - b->tnonil = true; + assert(!b->tnil); for (BUN i = 0; i < count; i++) { t = (void *) ((char *) values + (i << b->tshift)); mskSetVal(b, p, *(msk *) t); @@ -1261,8 +1260,7 @@ BUNappendmulti(BAT *b, const void *value } } } else { - b->tnil = true; - b->tnonil = false; + setnil = true; } p++; } @@ -1282,10 +1280,13 @@ BUNappendmulti(BAT *b, const void *value p++; } nunique = b->thash ? b->thash->nunique : 0; - b->tnil = b->ttype != TYPE_msk; + setnil |= b->ttype != TYPE_msk; + } + MT_lock_set(&b->theaplock); + if (setnil) { + b->tnil = true; b->tnonil = false; } - MT_lock_set(&b->theaplock); b->tminpos = bi.minpos; b->tmaxpos = bi.maxpos; if (count > BATcount(b) / gdk_unique_estimate_keep_fraction) diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -2004,13 +2004,16 @@ BATordered(BAT *b) lng t0 = GDKusec(); bool sorted; + MT_rwlock_rdlock(&b->thashlock); MT_lock_set(&b->theaplock); if (b->ttype == TYPE_void || b->tsorted || BATcount(b) == 0) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return true; } if (b->tnosorted > 0 || !ATOMlinear(b->ttype)) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return false; } @@ -2121,6 +2124,7 @@ BATordered(BAT *b) } } doreturn: + MT_rwlock_rdunlock(&b->thashlock); sorted = b->tsorted; bat pbid = VIEWtparent(b); MT_lock_unset(&b->theaplock); @@ -2185,17 +2189,21 @@ BATordered_rev(BAT *b) if (b == NULL || !ATOMlinear(b->ttype)) return false; + MT_rwlock_rdlock(&b->thashlock); MT_lock_set(&b->theaplock); if (BATcount(b) <= 1 || b->trevsorted) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return true; } if (b->ttype == TYPE_void) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return is_oid_nil(b->tseqbase); } if (BATtdense(b) || b->tnorevsorted > 0) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return false; } BATiter bi = bat_iterator_nolock(b); @@ -2240,6 +2248,7 @@ BATordered_rev(BAT *b) TRC_DEBUG(ALGO, "Fixed revsorted for " ALGOBATFMT " (" LLFMT " usec)\n", ALGOBATPAR(b), GDKusec() - t0); } doreturn: + MT_rwlock_rdunlock(&b->thashlock);
MonetDB: nested - simplify
Changeset: 2dfa4a6dd06a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/2dfa4a6dd06a Modified Files: sql/backends/monet5/vaults/json/json.c Branch: nested Log Message: simplify diffs (120 lines): diff --git a/sql/backends/monet5/vaults/json/json.c b/sql/backends/monet5/vaults/json/json.c --- a/sql/backends/monet5/vaults/json/json.c +++ b/sql/backends/monet5/vaults/json/json.c @@ -93,59 +93,48 @@ read_json_file(JSONFileHandle *jfh) return content; } - -static size_t -append_terms(allocator *sa, JSON *jt, size_t offset, BAT *b, char **error) +static str +append_terms(allocator *sa, JSON *jt, BAT *b) { - JSONterm *t = jt->elm + offset; + str error = MAL_SUCCEED; + size_t offset = 0; + JSONterm *root = jt->elm, *t; char *v = NULL; - JSONterm *prev = offset > 0 ? (jt->elm + (offset - 1)) : NULL; - JSONterm *next = offset < (size_t)jt->free ? jt->elm + (offset + 1): NULL; - switch(t->kind) { - case JSON_ARRAY: - if (prev==NULL && (next && next->kind < JSON_ELEMENT)) { - offset += 1; - } else { - // array of basic types or array of arrays - v = sa_strndup(sa, t->value, t->valuelen); - do { - offset += 1; - next = offset < (size_t)jt->free ? jt->elm + offset : NULL; - } while((next && next->kind != JSON_VALUE)); - } - break; - case JSON_OBJECT: - v = sa_strndup(sa, t->value, t->valuelen); - int depth = 0; - do { - offset += 1; - next = offset < (size_t)jt->free ? jt->elm + offset : NULL; - prev = jt->elm + (offset - 1); - if ((next && next->kind == JSON_OBJECT) && prev->kind == JSON_ELEMENT) - depth += 1; - if (next && next->kind == JSON_VALUE) { - depth -= 1; + int depth = 0; + + while(offset < (size_t) jt->free && !error) { + t = jt->elm + offset; + JSONterm *prev = offset > 0 ? jt->elm + (offset - 1) : NULL; + switch(t->kind) { + case JSON_ARRAY: + case JSON_OBJECT: + if ((root->kind == JSON_ARRAY && depth == 1) || root->kind == JSON_OBJECT) { + v = sa_strndup(sa, t->value, t->valuelen); + if (v) { + if (BUNappend(b, v, false) != GDK_SUCCEED) { + error = createException(SQL, "json.append_terms", "BUNappend failed!"); + } + } } - if (next && next->kind == JSON_VALUE && prev->kind == JSON_VALUE) - depth = 0; - } while((next && next->kind != JSON_VALUE) || (next && depth > 0)); - break; - case JSON_ELEMENT: - case JSON_STRING: - case JSON_NUMBER: - case JSON_VALUE: - offset +=1; - break; - default: - *error = createException(SQL, "json.append_terms", "unknown json term"); - break; + if ((prev && (prev->kind == JSON_ARRAY || prev->kind == JSON_VALUE)) || (prev==NULL && root->kind == + JSON_ARRAY)) + depth ++; + break; + case JSON_ELEMENT: + case JSON_STRING: + case JSON_NUMBER: + case JSON_NULL: + break; + case JSON_VALUE: + depth --; + break; + default: + error = createException(SQL, "json.append_terms", "unknown json term"); + break; + } + offset +=1; } - if (v) { - if (BUNappend(b, v, false) != GDK_SUCCEED) { - *error = createException(SQL, "json.append_terms", "BUNappend failed!"); - } - } - return offset; + return error; } @@ -246,17 +235,7 @@ JSONread_json(Client cntxt, MalBlkP
MonetDB: Aug2024 - Slight error which caused all MAL tests to be...
Changeset: 8f0ba39f3d19 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/8f0ba39f3d19 Modified Files: testing/sqllogictest.py Branch: Aug2024 Log Message: Slight error which caused all MAL tests to be skipped. diffs (40 lines): diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -172,16 +172,17 @@ class SQLLogic: self.alltests = alltests if language == 'sql': transfer_handler = UnsafeDirectoryHandler(self.srcdir) -self.dbh = pymonetdb.connect(username=username, - password=password, - hostname=hostname, - port=port, - database=database, - autocommit=True, - connect_timeout=timeout if timeout > 0 else -1) -self.dbh.set_uploader(transfer_handler) -self.dbh.set_downloader(transfer_handler) -self.crs = self.dbh.cursor() +dbh = pymonetdb.connect(username=username, +password=password, +hostname=hostname, +port=port, +database=database, +autocommit=True, +connect_timeout=timeout if timeout > 0 else -1) +self.dbh = dbh +dbh.set_uploader(transfer_handler) +dbh.set_downloader(transfer_handler) +self.crs = dbh.cursor() else: dbh = malmapi.Connection() dbh.connect(database=database, @@ -193,7 +194,7 @@ class SQLLogic: connect_timeout=timeout if timeout > 0 else -1) self.crs = MapiCursor(dbh) if timeout > 0: -self.dbh.settimeout(timeout) +dbh.settimeout(timeout) def add_connection(self, conn_id, username='monetdb', password='monetdb'): if self.conn_map.get(conn_id, None) is None: ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Mar2025 - Merge with Aug2024 branch.
Changeset: 5f12ab5fea1f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5f12ab5fea1f Modified Files: testing/sqllogictest.py Branch: Mar2025 Log Message: Merge with Aug2024 branch. diffs (40 lines): diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -172,16 +172,17 @@ class SQLLogic: self.alltests = alltests if language == 'sql': transfer_handler = UnsafeDirectoryHandler(self.srcdir) -self.dbh = pymonetdb.connect(username=username, - password=password, - hostname=hostname, - port=port, - database=database, - autocommit=True, - connect_timeout=timeout if timeout > 0 else -1) -self.dbh.set_uploader(transfer_handler) -self.dbh.set_downloader(transfer_handler) -self.crs = self.dbh.cursor() +dbh = pymonetdb.connect(username=username, +password=password, +hostname=hostname, +port=port, +database=database, +autocommit=True, +connect_timeout=timeout if timeout > 0 else -1) +self.dbh = dbh +dbh.set_uploader(transfer_handler) +dbh.set_downloader(transfer_handler) +self.crs = dbh.cursor() else: dbh = malmapi.Connection() dbh.connect(database=database, @@ -193,7 +194,7 @@ class SQLLogic: connect_timeout=timeout if timeout > 0 else -1) self.crs = MapiCursor(dbh) if timeout > 0: -self.dbh.settimeout(timeout) +dbh.settimeout(timeout) def add_connection(self, conn_id, username='monetdb', password='monetdb'): if self.conn_map.get(conn_id, None) is None: ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Mar2025 branch.
Changeset: 4b172ba3df68 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/4b172ba3df68 Branch: default Log Message: Merge with Mar2025 branch. diffs (269 lines): diff --git a/clients/mapilib/msettings_internal.h b/clients/mapilib/msettings_internal.h --- a/clients/mapilib/msettings_internal.h +++ b/clients/mapilib/msettings_internal.h @@ -88,6 +88,8 @@ realloc_with_fallback(msettings_allocato { return alloc ? alloc(alloc_state, old, size) + : size == 0 + ? (free(old), NULL) : realloc(old, size); } @@ -114,8 +116,11 @@ msettings_alloc_zeroed(const msettings * static inline void* msettings_dealloc(const msettings *mp, void *data) { - if (data != NULL) - msettings_realloc(mp, data, 0); + if (data != NULL) { + void *p = msettings_realloc(mp, data, 0); + (void) p; /* in case we don't have asserts */ + assert(p == NULL); + } return NULL; } diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -369,7 +369,9 @@ BATextend(BAT *b, BUN newcap) * otherwise you may easily corrupt the administration of * malloc. */ + MT_lock_set(&b->theaplock); if (newcap <= BATcapacity(b)) { + MT_lock_unset(&b->theaplock); return GDK_SUCCEED; } @@ -380,7 +382,6 @@ BATextend(BAT *b, BUN newcap) theap_size = (size_t) newcap << b->tshift; } - MT_lock_set(&b->theaplock); if (b->theap->base) { TRC_DEBUG(HEAP, "HEAPgrow in BATextend %s %zu %zu\n", b->theap->filename, b->theap->size, theap_size); @@ -925,6 +926,7 @@ BUNappendmulti(BAT *b, const void *value } if (dense) { MT_lock_set(&b->theaplock); + assert(BATtdense(b)); /* no change (coverity) */ if (b->batCount == 0) b->tseqbase = ovals ? ovals[0] : oid_nil; BATsetcount(b, BATcount(b) + count); @@ -1287,74 +1289,45 @@ BUNappend(BAT *b, const void *t, bool fo gdk_return BUNdelete(BAT *b, oid o) { - BUN p; - BATiter bi = bat_iterator_nolock(b); - const void *val; - bool locked = false; - BUN nunique; + BATiter bi = bat_iterator(b); - assert(!is_oid_nil(b->hseqbase) || BATcount(b) == 0); - if (o < b->hseqbase || o >= b->hseqbase + BATcount(b)) { - /* value already not there */ - return GDK_SUCCEED; + if (bi.count == 0) { + bat_iterator_end(&bi); + GDKerror("cannot delete from empty bat\n"); + return GDK_FAIL; + } + if (is_oid_nil(b->hseqbase)) { + bat_iterator_end(&bi); + GDKerror("cannot delete from bat with VOID hseqbase\n"); + return GDK_FAIL; } - assert(BATcount(b) > 0); /* follows from "if" above */ - p = o - b->hseqbase; - if (p < b->batInserted) { + + BUN p = o - b->hseqbase; + + if (bi.count - 1 != p) { + bat_iterator_end(&bi); + GDKerror("cannot delete anything other than last value\n"); + return GDK_FAIL; + } + if (b->batInserted >= bi.count) { + bat_iterator_end(&bi); GDKerror("cannot delete committed value\n"); return GDK_FAIL; } + TRC_DEBUG(ALGO, ALGOBATFMT " deleting oid " OIDFMT "\n", ALGOBATPAR(b), o); /* load hash so that we can maintain it */ (void) BATcheckhash(b); - val = BUNtail(bi, p); - /* writing the values should be locked, reading could be done -* unlocked (since we're the only thread that should be changing -* anything) */ + BUN nunique = HASHdelete(&bi, p, BUNtail(bi, p)); + ATOMdel(b->ttype, b->tvheap, (var_t *) BUNtloc(bi, p)); + bat_iterator_end(&bi); + MT_lock_set(&b->theaplock); if (b->tmaxpos == p) b->tmaxpos = BUN_NONE; if (b->tminpos == p) b->tminpos = BUN_NONE; - MT_lock_unset(&b->theaplock); - nunique = HASHdelete(&bi, p, val); - ATOMdel(b->ttype, b->tvheap, (var_t *) BUNtloc(bi, p)); - if (p != BATcount(b) - 1 && - (b->ttype != TYPE_void || BATtdense(b))) { - /* replace to-be-delete BUN with last BUN; materialize -* void column before doing so */ - if (b->ttype == TYPE_void && - BATmaterialize(b, BUN_NONE) != GDK_SUCCEED) - return GDK_FAIL; - if (ATOMstorage(b->ttype) == TYPE_msk) { - msk mval = mskGetVal(b, BATcount(b) - 1); - assert(b->thash == NULL); - mskSetVal(b, p, mval); -
MonetDB: Mar2025 - Coverity-inspired fixes.
Changeset: c38b49e1fc9e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c38b49e1fc9e Modified Files: clients/mapilib/msettings_internal.h gdk/gdk_bat.c gdk/gdk_batop.c monetdb5/mal/Tests/tst025.maltest Branch: Mar2025 Log Message: Coverity-inspired fixes. BUNdelete is now only allowed to delete the last value from a bat. diffs (229 lines): diff --git a/clients/mapilib/msettings_internal.h b/clients/mapilib/msettings_internal.h --- a/clients/mapilib/msettings_internal.h +++ b/clients/mapilib/msettings_internal.h @@ -88,6 +88,8 @@ realloc_with_fallback(msettings_allocato { return alloc ? alloc(alloc_state, old, size) + : size == 0 + ? (free(old), NULL) : realloc(old, size); } @@ -114,8 +116,11 @@ msettings_alloc_zeroed(const msettings * static inline void* msettings_dealloc(const msettings *mp, void *data) { - if (data != NULL) - msettings_realloc(mp, data, 0); + if (data != NULL) { + void *p = msettings_realloc(mp, data, 0); + (void) p; /* in case we don't have asserts */ + assert(p == NULL); + } return NULL; } diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -369,7 +369,9 @@ BATextend(BAT *b, BUN newcap) * otherwise you may easily corrupt the administration of * malloc. */ + MT_lock_set(&b->theaplock); if (newcap <= BATcapacity(b)) { + MT_lock_unset(&b->theaplock); return GDK_SUCCEED; } @@ -380,7 +382,6 @@ BATextend(BAT *b, BUN newcap) theap_size = (size_t) newcap << b->tshift; } - MT_lock_set(&b->theaplock); if (b->theap->base) { TRC_DEBUG(HEAP, "HEAPgrow in BATextend %s %zu %zu\n", b->theap->filename, b->theap->size, theap_size); @@ -925,6 +926,7 @@ BUNappendmulti(BAT *b, const void *value } if (dense) { MT_lock_set(&b->theaplock); + assert(BATtdense(b)); /* no change (coverity) */ if (b->batCount == 0) b->tseqbase = ovals ? ovals[0] : oid_nil; BATsetcount(b, BATcount(b) + count); @@ -1287,74 +1289,45 @@ BUNappend(BAT *b, const void *t, bool fo gdk_return BUNdelete(BAT *b, oid o) { - BUN p; - BATiter bi = bat_iterator_nolock(b); - const void *val; - bool locked = false; - BUN nunique; + BATiter bi = bat_iterator(b); - assert(!is_oid_nil(b->hseqbase) || BATcount(b) == 0); - if (o < b->hseqbase || o >= b->hseqbase + BATcount(b)) { - /* value already not there */ - return GDK_SUCCEED; + if (bi.count == 0) { + bat_iterator_end(&bi); + GDKerror("cannot delete from empty bat\n"); + return GDK_FAIL; + } + if (is_oid_nil(b->hseqbase)) { + bat_iterator_end(&bi); + GDKerror("cannot delete from bat with VOID hseqbase\n"); + return GDK_FAIL; } - assert(BATcount(b) > 0); /* follows from "if" above */ - p = o - b->hseqbase; - if (p < b->batInserted) { + + BUN p = o - b->hseqbase; + + if (bi.count - 1 != p) { + bat_iterator_end(&bi); + GDKerror("cannot delete anything other than last value\n"); + return GDK_FAIL; + } + if (b->batInserted >= bi.count) { + bat_iterator_end(&bi); GDKerror("cannot delete committed value\n"); return GDK_FAIL; } + TRC_DEBUG(ALGO, ALGOBATFMT " deleting oid " OIDFMT "\n", ALGOBATPAR(b), o); /* load hash so that we can maintain it */ (void) BATcheckhash(b); - val = BUNtail(bi, p); - /* writing the values should be locked, reading could be done -* unlocked (since we're the only thread that should be changing -* anything) */ + BUN nunique = HASHdelete(&bi, p, BUNtail(bi, p)); + ATOMdel(b->ttype, b->tvheap, (var_t *) BUNtloc(bi, p)); + bat_iterator_end(&bi); + MT_lock_set(&b->theaplock); if (b->tmaxpos == p) b->tmaxpos = BUN_NONE; if (b->tminpos == p) b->tminpos = BUN_NONE; - MT_lock_unset(&b->theaplock); - nunique = HASHdelete(&bi, p, val); - ATOMdel(b->ttype, b->tvheap, (var_t *) BUNtloc(bi, p)); - if (p != BATcount(b) - 1 && - (b->ttype != TYPE_void || BATtdense(b))) { - /* replace to-be-delete BUN with last BUN; materialize -* void column before doing so */ - if (b->ttype == TYPE_void && - BATmaterialize(b, BUN_NONE) != GDK_SUCCEED) - return GDK_FAIL; - if
MonetDB: default - Updates sql/ChangeLog with the extension of t...
Changeset: 82ca753f7778 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/82ca753f7778 Modified Files: sql/ChangeLog Branch: default Log Message: Updates sql/ChangeLog with the extension of the constant aggregate optimizer diffs (14 lines): diff --git a/sql/ChangeLog b/sql/ChangeLog --- a/sql/ChangeLog +++ b/sql/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog file for sql # This file is updated with Maddlog +* Mon Feb 10 2025 stefanos mavros +- Extended the constant aggregate optimizer in order to eliminate + aggregates with constant arguments whenever possible. + * Fri Dec 20 2024 Niels Nes - Added support for aggregates which order within the group such as quantile and which potentially order within the group such as ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Get rid of ATOMIC_PTR_DESTROY. There is no i...
Changeset: 17546403dadb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/17546403dadb Modified Files: common/utils/matomic.h monetdb5/mal/mal_dataflow.c sql/storage/bat/bat_storage.c sql/storage/store.c Branch: default Log Message: Get rid of ATOMIC_PTR_DESTROY. There is no implementation that needs this. diffs (258 lines): diff --git a/common/utils/matomic.h b/common/utils/matomic.h --- a/common/utils/matomic.h +++ b/common/utils/matomic.h @@ -36,7 +36,6 @@ * * Some of these are also available for pointers: * ATOMIC_PTR_INIT - * ATOMIC_PTR_DESTROY * ATOMIC_PTR_GET * ATOMIC_PTR_SET * ATOMIC_PTR_XCG @@ -130,7 +129,6 @@ typedef volatile atomic_address ATOMIC_P typedef void *_Atomic volatile ATOMIC_PTR_TYPE; #endif #define ATOMIC_PTR_INIT(var, val) atomic_init(var, val) -#define ATOMIC_PTR_DESTROY(var)((void) 0) #define ATOMIC_PTR_VAR_INIT(val) ATOMIC_VAR_INIT(val) #define ATOMIC_PTR_GET(var)(*(var)) #define ATOMIC_PTR_SET(var, val) (*(var) = (void *) (val)) @@ -239,7 +237,6 @@ ATOMIC_CAS(ATOMIC_TYPE *var, ATOMIC_BASE typedef PVOID volatile ATOMIC_PTR_TYPE; #define ATOMIC_PTR_INIT(var, val) (*(var) = (val)) -#define ATOMIC_PTR_DESTROY(var)((void) 0) #define ATOMIC_PTR_VAR_INIT(val) (val) #define ATOMIC_PTR_GET(var)(*(var)) #define ATOMIC_PTR_SET(var, val) _InterlockedExchangePointer(var, (PVOID) (val)) @@ -288,7 +285,6 @@ typedef volatile ATOMIC_BASE_TYPE ATOMIC typedef void *volatile ATOMIC_PTR_TYPE; #define ATOMIC_PTR_INIT(var, val) (*(var) = (val)) #define ATOMIC_PTR_VAR_INIT(val) (val) -#define ATOMIC_PTR_DESTROY(var)((void) 0) #define ATOMIC_PTR_GET(var)__atomic_load_n(var, __ATOMIC_SEQ_CST) #define ATOMIC_PTR_SET(var, val) __atomic_store_n(var, (val), __ATOMIC_SEQ_CST) #define ATOMIC_PTR_XCG(var, val) __atomic_exchange_n(var, (val), __ATOMIC_SEQ_CST) diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c --- a/monetdb5/mal/mal_dataflow.c +++ b/monetdb5/mal/mal_dataflow.c @@ -494,7 +494,6 @@ DFLOWinitialize(void) MT_sema_init(&t->s, 0, "DFLOWsema"); /* placeholder name */ if (MT_create_thread(&t->id, DFLOWworker, t, MT_THR_JOINABLE, "DFLOWworker") < 0) { - ATOMIC_PTR_DESTROY(&t->cntxt); MT_sema_destroy(&t->s); GDKfree(t); } else { @@ -756,7 +755,6 @@ finish_worker(struct worker *t) MT_lock_unset(&dataflowLock); MT_join_thread(t->id); MT_sema_destroy(&t->s); - ATOMIC_PTR_DESTROY(&t->cntxt); GDKfree(t); MT_lock_set(&dataflowLock); } @@ -835,7 +833,6 @@ runMALdataflow(Client cntxt, MalBlkPtr m MT_sema_init(&t->s, 0, "DFLOWsema"); /* placeholder name */ if (MT_create_thread(&t->id, DFLOWworker, t, MT_THR_JOINABLE, "DFLOWworker") < 0) { - ATOMIC_PTR_DESTROY(&t->cntxt); MT_sema_destroy(&t->s); GDKfree(t); t = NULL; @@ -905,7 +902,6 @@ runMALdataflow(Client cntxt, MalBlkPtr m GDKfree(flow->nodes); q_destroy(flow->done); MT_lock_destroy(&flow->flowlock); - ATOMIC_PTR_DESTROY(&flow->error); GDKfree(flow); /* we created one worker, now tell one worker to exit again */ 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 @@ -141,7 +141,6 @@ tc_gc_seg( sql_store Store, sql_change * if (s->ts <= oldest) { while(s) { segment *n = s->prev; - ATOMIC_PTR_DESTROY(&s->next); _DELETE(s); s = n; } @@ -453,7 +452,6 @@ merge_segments(storage *s, sql_trans *tr if (cur == s->segs->t) s->segs->t = seg; if (commit_ts == oldest) { - ATOMIC_PTR_DESTROY(&cur->next); _DELETE(cur); } else mark4destroy(cur, change, commit_ts); @@ -2549,7 +2547,6 @@ destroy_segments(segments *s) segment *seg = s->h; while(seg) { segment *n = ATOMIC_PTR_GET(&seg->next); - ATOMIC_PTR_DESTROY(&seg->next); _DELETE(seg); seg = n; } diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/st
MonetDB: default - Merge with Aug2024 branch.
Changeset: fd30df6fc710 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/fd30df6fc710 Modified Files: gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_heap.c gdk/gdk_join.c gdk/gdk_logger.c gdk/gdk_system.c sql/backends/monet5/sql_scenario.c sql/storage/bat/bat_storage.c sql/storage/sql_storage.h sql/storage/store.c Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 596 to 300 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -967,6 +967,7 @@ BUNappendmulti(BAT *b, const void *value VALcopy(&maxprop, prop) != NULL) maxbound = VALptr(&maxprop); const bool notnull = BATgetprop_nolock(b, GDK_NOT_NULL) != NULL; + bool setnil = false; MT_lock_unset(&b->theaplock); MT_rwlock_wrlock(&b->thashlock); if (values && b->ttype) { @@ -1046,8 +1047,7 @@ BUNappendmulti(BAT *b, const void *value } } } else { - b->tnil = true; - b->tnonil = false; + setnil = true; } p++; } @@ -1067,8 +1067,7 @@ BUNappendmulti(BAT *b, const void *value } else if (ATOMstorage(b->ttype) == TYPE_msk) { bi.minpos = bi.maxpos = BUN_NONE; minvalp = maxvalp = NULL; - b->tnil = false; - b->tnonil = true; + assert(!b->tnil); for (BUN i = 0; i < count; i++) { t = (void *) ((char *) values + (i << b->tshift)); mskSetVal(b, p, *(msk *) t); @@ -1106,8 +1105,7 @@ BUNappendmulti(BAT *b, const void *value } } } else { - b->tnil = true; - b->tnonil = false; + setnil = true; } p++; } @@ -1127,10 +1125,13 @@ BUNappendmulti(BAT *b, const void *value p++; } nunique = b->thash ? b->thash->nunique : 0; - b->tnil = b->ttype != TYPE_msk; + setnil |= b->ttype != TYPE_msk; + } + MT_lock_set(&b->theaplock); + if (setnil) { + b->tnil = true; b->tnonil = false; } - MT_lock_set(&b->theaplock); b->tminpos = bi.minpos; b->tmaxpos = bi.maxpos; if (count > BATcount(b) / gdk_unique_estimate_keep_fraction) diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -2004,13 +2004,16 @@ BATordered(BAT *b) lng t0 = GDKusec(); bool sorted; + MT_rwlock_rdlock(&b->thashlock); MT_lock_set(&b->theaplock); if (b->ttype == TYPE_void || b->tsorted || BATcount(b) == 0) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return true; } if (b->tnosorted > 0 || !ATOMlinear(b->ttype)) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return false; } @@ -2121,6 +2124,7 @@ BATordered(BAT *b) } } doreturn: + MT_rwlock_rdunlock(&b->thashlock); sorted = b->tsorted; bat pbid = VIEWtparent(b); MT_lock_unset(&b->theaplock); @@ -2185,17 +2189,21 @@ BATordered_rev(BAT *b) if (b == NULL || !ATOMlinear(b->ttype)) return false; + MT_rwlock_rdlock(&b->thashlock); MT_lock_set(&b->theaplock); if (BATcount(b) <= 1 || b->trevsorted) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return true; } if (b->ttype == TYPE_void) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return is_oid_nil(b->tseqbase); } if (BATtdense(b) || b->tnorevsorted > 0) { MT_lock_unset(&b->theaplock); + MT_rwlock_rdunlock(&b->thashlock); return false; } BATiter bi = bat_iterator_nolock(b); @@ -2240,6 +2248,7 @@ BATordered_rev(BAT *b) TRC_DEBUG(ALGO, "Fixed revsorted for " ALGOBATFMT " (" LLFMT " usec)\n", ALGOBATPAR(b), GDKusec() - t0); } doreturn: + MT_rwlock_rdunlock(&b->thashlock); revsorted = b->
MonetDB: default - Step two towards a new stable branch "Mar2025".
Changeset: ad984ac4cabb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ad984ac4cabb Modified Files: .bumpversion.cfg ChangeLog MonetDB.spec clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc cmake/monetdb-versions.cmake debian/control gdk/ChangeLog gdk/libbat.rc geom/ChangeLog monetdb5/ChangeLog monetdb5/tools/libmonetdb5.rc sql/ChangeLog Branch: default Log Message: Step two towards a new stable branch "Mar2025". Increment version numbers. >From now on, *all* bug fixes, and *only* bug fixes, *must* go to the stable branch with the name "Mar2025". diffs (truncated from 359 to 300 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.52.0 +current_version = 11.54.0 commit = False tag = False diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,3 @@ # ChangeLog file for devel # This file is updated with Maddlog -* Mon Sep 16 2024 Joeri van Ruth -- Hot snapshot: allow member files larger than 64 GiB. By member files we mean - the files inside the resulting .tar file, not the tar file itself. Huge member - files are written using a GNU tar extension to the original tar format, which - doesn't support more than 8 GiB. - diff --git a/ChangeLog b/ChangeLog.Mar2025 copy from ChangeLog copy to ChangeLog.Mar2025 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -8,7 +8,7 @@ # Copyright August 2008 - 2023 MonetDB B.V.; # Copyright 1997 - July 2008 CWI. -%global version 11.52.0 +%global version 11.54.0 %bcond_with compat diff --git a/clients/ChangeLog b/clients/ChangeLog.Mar2025 copy from clients/ChangeLog copy to clients/ChangeLog.Mar2025 diff --git a/clients/mapilib/ChangeLog b/clients/mapilib/ChangeLog.Mar2025 copy from clients/mapilib/ChangeLog copy to clients/mapilib/ChangeLog.Mar2025 diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc --- a/clients/mapilib/mapi.rc +++ b/clients/mapilib/mapi.rc @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,patch)#major "." #minor "." #patch "\0" 1 VERSIONINFO - FILEVERSION version(11,52,0) - PRODUCTVERSION version(11,52,0) + FILEVERSION version(11,54,0) + PRODUCTVERSION version(11,54,0) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -21,14 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB Foundation\0" VALUE "FileDescription", "MonetDB Application Interface DLL\0" - VALUE "FileVersion", sversion(11,52,0) + VALUE "FileVersion", sversion(11,54,0) VALUE "InternalName", "Mapi\0" VALUE "LegalCopyright", "Copyright (c) 2024, 2025 MonetDB Foundation\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "Mapi.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB Client Libraries\0" - VALUE "ProductVersion", sversion(11,52,0) + VALUE "ProductVersion", sversion(11,54,0) VALUE "SpecialBuild", "\0" END END diff --git a/clients/odbc/ChangeLog b/clients/odbc/ChangeLog.Mar2025 copy from clients/odbc/ChangeLog copy to clients/odbc/ChangeLog.Mar2025 diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc --- a/clients/odbc/driver/driver.rc +++ b/clients/odbc/driver/driver.rc @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,patch)#major "." #minor "." #patch "\0" 1 VERSIONINFO - FILEVERSION version(11,52,0) - PRODUCTVERSION version(11,52,0) + FILEVERSION version(11,54,0) + PRODUCTVERSION version(11,54,0) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -21,14 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB Foundation\0" VALUE "FileDescription", "MonetDB ODBC Driver DLL\0" - VALUE "FileVersion", sversion(11,52,0) + VALUE "FileVersion", sversion(11,54,0) VALUE "InternalName", "MonetODBC\0" VALUE "LegalCopyright", "Copyright (c) 2024, 2025 MonetDB Foundation\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MonetODBC.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB ODBC Driver\0" - VALUE "ProductVersion", sversion(11,52,0) + VALUE "ProductVersion", sversion(11,54,0) VALUE "SpecialBuild", "\0" END END diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc --- a/clients/odbc/winsetup/setup.rc +++ b/clients/odbc/winsetup/setup.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION version(11,52,0) - PRODUCTVERSION version(11,52,0) + FILEVERSION version(11,54,0) + PRODUCTVERSION version(11,54,0) FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +69,12 @@ BEGIN BEGIN
MonetDB: Mar2025 - Step one towards a new stable branch "Mar2025".
Changeset: 6497a5bc3736 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6497a5bc3736 Added Files: ChangeLog.Mar2025 clients/ChangeLog.Mar2025 clients/mapilib/ChangeLog.Mar2025 clients/odbc/ChangeLog.Mar2025 common/stream/ChangeLog.Mar2025 gdk/ChangeLog.Mar2025 geom/ChangeLog.Mar2025 misc/ChangeLog.Mar2025 monetdb5/ChangeLog.Mar2025 sql/ChangeLog.Mar2025 testing/ChangeLog.Mar2025 tools/merovingian/ChangeLog.Mar2025 Removed Files: ChangeLog clients/ChangeLog clients/mapilib/ChangeLog clients/odbc/ChangeLog common/stream/ChangeLog gdk/ChangeLog geom/ChangeLog misc/ChangeLog monetdb5/ChangeLog sql/ChangeLog testing/ChangeLog tools/merovingian/ChangeLog Modified Files: .bumpversion.cfg MonetDB.spec clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc cmake/monetdb-versions.cmake debian/control gdk/libbat.rc monetdb5/tools/libmonetdb5.rc sql/backends/monet5/sql_upgrades.c Branch: Mar2025 Log Message: Step one towards a new stable branch "Mar2025". Incremented version numbers. Moved ChangeLog file to ChangeLog.Mar2025. The root of the stable branch is "Mar2025_root". diffs (271 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.52.0 +current_version = 11.53.0 commit = False tag = False diff --git a/ChangeLog b/ChangeLog.Mar2025 rename from ChangeLog rename to ChangeLog.Mar2025 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -8,7 +8,7 @@ # Copyright August 2008 - 2023 MonetDB B.V.; # Copyright 1997 - July 2008 CWI. -%global version 11.52.0 +%global version 11.53.0 %bcond_with compat diff --git a/clients/ChangeLog b/clients/ChangeLog.Mar2025 rename from clients/ChangeLog rename to clients/ChangeLog.Mar2025 diff --git a/clients/mapilib/ChangeLog b/clients/mapilib/ChangeLog.Mar2025 rename from clients/mapilib/ChangeLog rename to clients/mapilib/ChangeLog.Mar2025 diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc --- a/clients/mapilib/mapi.rc +++ b/clients/mapilib/mapi.rc @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,patch)#major "." #minor "." #patch "\0" 1 VERSIONINFO - FILEVERSION version(11,52,0) - PRODUCTVERSION version(11,52,0) + FILEVERSION version(11,53,0) + PRODUCTVERSION version(11,53,0) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -21,14 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB Foundation\0" VALUE "FileDescription", "MonetDB Application Interface DLL\0" - VALUE "FileVersion", sversion(11,52,0) + VALUE "FileVersion", sversion(11,53,0) VALUE "InternalName", "Mapi\0" VALUE "LegalCopyright", "Copyright (c) 2024, 2025 MonetDB Foundation\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "Mapi.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB Client Libraries\0" - VALUE "ProductVersion", sversion(11,52,0) + VALUE "ProductVersion", sversion(11,53,0) VALUE "SpecialBuild", "\0" END END diff --git a/clients/odbc/ChangeLog b/clients/odbc/ChangeLog.Mar2025 rename from clients/odbc/ChangeLog rename to clients/odbc/ChangeLog.Mar2025 diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc --- a/clients/odbc/driver/driver.rc +++ b/clients/odbc/driver/driver.rc @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,patch)#major "." #minor "." #patch "\0" 1 VERSIONINFO - FILEVERSION version(11,52,0) - PRODUCTVERSION version(11,52,0) + FILEVERSION version(11,53,0) + PRODUCTVERSION version(11,53,0) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -21,14 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB Foundation\0" VALUE "FileDescription", "MonetDB ODBC Driver DLL\0" - VALUE "FileVersion", sversion(11,52,0) + VALUE "FileVersion", sversion(11,53,0) VALUE "InternalName", "MonetODBC\0" VALUE "LegalCopyright", "Copyright (c) 2024, 2025 MonetDB Foundation\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MonetODBC.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB ODBC Driver\0" - VALUE "ProductVersion", sversion(11,52,0) + VALUE "ProductVersion", sversion(11,53,0) VALUE "SpecialBuild", "\0" END END diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc --- a/clients/odbc/winsetup/setup.rc +++ b/clients/odbc/winsetup/setup.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION versio
MonetDB: default - Added tag Mar2025_root for changeset fd30df6f...
Changeset: 52b2af67e629 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/52b2af67e629 Modified Files: .hgtags Branch: default Log Message: Added tag Mar2025_root for changeset fd30df6fc710 diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -837,3 +837,4 @@ ab5d60be21cd1c65e9de476d71a86c2995f70785 ab5d60be21cd1c65e9de476d71a86c2995f70785 Aug2024_SP1_release 30e6380820842b9e0325536eb22d7cb3843ab095 Aug2024_7 30e6380820842b9e0325536eb22d7cb3843ab095 Aug2024_SP2_release +fd30df6fc710aa7615a995dd826389a67cddd47f Mar2025_root ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: nested - add timestamp support
Changeset: e7d555782a5d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e7d555782a5d Modified Files: sql/backends/monet5/sql.c Branch: nested Log Message: add timestamp support diffs (34 lines): diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -5731,6 +5731,9 @@ jsonv2local(const ValPtr t, char *v) case TYPE_str: t->val.sval = v; break; + case TYPE_timestamp: + sql_timestamp_fromstr(v+1, &t->val.lval, 0, 0); + break; default: return NULL; } @@ -5847,12 +5850,14 @@ insert_json_array(char **msg, JSON *js, switch (jt->kind) { case JSON_OBJECT: // FIX assumes array of composite? - n = t->type->d.fields->h; - if (n) { - sql_arg *a = n->data; - sql_subtype *atype = &a->type; - if (atype->type->composite) - t = atype; + if (t->type->composite && list_length(t->type->d.fields) == 1) { + n = t->type->d.fields->h; + if (n) { + sql_arg *a = n->data; + sql_subtype *atype = &a->type; + if (atype->type->composite) + t = atype; + } } elm = insert_json_object(msg, js, bats, bat_offset + 1, nr, elm, id, anr++, t); (void)oanr; // outer array number ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Mar2025 - Approve test.
Changeset: c361605d7f97 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c361605d7f97 Modified Files: monetdb5/mal/Tests/tst032.maltest Branch: Mar2025 Log Message: Approve test. diffs (20 lines): diff --git a/monetdb5/mal/Tests/tst032.maltest b/monetdb5/mal/Tests/tst032.maltest --- a/monetdb5/mal/Tests/tst032.maltest +++ b/monetdb5/mal/Tests/tst032.maltest @@ -36,7 +36,7 @@ 3 2 2 -statement ok +statement error bat.delete(b,k) query II rowsort @@ -45,5 +45,7 @@ io.print(b) 0 0 1 +3 +2 2 ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org