Changeset: 772f3f9d90bf for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/772f3f9d90bf
Modified Files:
sql/backends/monet5/rel_bin.c
sql/common/sql_types.c
sql/server/rel_dump.c
sql/server/rel_optimize_others.c
sql/server/rel_psm.c
sql/server/rel_select.c
sql/server/rel_unnest.c
sql/server/sql_parser.y
sql/storage/store.c
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.int128
Branch: ordered-set-aggregates
Log Message:
merged with default
diffs (truncated from 5680 to 300 lines):
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -48,12 +48,7 @@ jobs:
ref: ${{ github.ref }}
- name: install pymonetdb cryptography
- run: pip3 install --user --upgrade pymonetdb cryptography
- if: runner.os != 'macOS'
-
- - name: install pymonetdb cryptography
run: pip3 install --user --break-system-packages --upgrade pymonetdb
cryptography
- if: runner.os == 'macOS'
- name: make MonetDB on linux
run: |
diff --git a/ChangeLog.Aug2024 b/ChangeLog.Aug2024
--- a/ChangeLog.Aug2024
+++ b/ChangeLog.Aug2024
@@ -1,3 +1,10 @@
# ChangeLog file for devel
# This file is updated with Maddlog
+* Thu Oct 17 2024 Niels Nes <[email protected]>
+- Changed generic Decimal handling (ie without digits/scale), old cased
+ mapped always into dec(18,3) now this is only done in case of create of
+ a column. In other cases the coercion to the correct decimal type is
+ based on the input data type. For *api (LANG*PY/C(pp)/R) we no longer
+ allow generic decimal type in the function definitions.
+
diff --git a/clients/Tests/MAL-signatures-hge.test
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -49539,6 +49539,11 @@ pattern sql.rank(X_0:any_1, X_1:bit, X_2
SQLrank;
return the ranked groups
sql
+read_dump_rel
+pattern sql.read_dump_rel(X_0:str):str
+SQLread_dump_rel;
+Reads sql_rel string into sql_rel object and then writes it to the return value
+sql
register
unsafe pattern sql.register(X_0:str, X_1:str, X_2:str, X_3:str):int
RAstatement2;
@@ -49879,6 +49884,11 @@ unsafe pattern sql.transaction_rollback(
SQLtransaction_rollback;
A transaction statement (type can be commit,release,rollback or start)
sql
+unclosed_result_sets
+pattern sql.unclosed_result_sets() (X_0:bat[:oid], X_1:bat[:int])
+sql_unclosed_result_sets;
+return query_id/res_id of unclosed result sets
+sql
unionfunc
pattern sql.unionfunc(X_0:str, X_1:str, X_2:any...):any...
SQLunionfunc;
diff --git a/clients/Tests/MAL-signatures.test
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -37969,6 +37969,11 @@ pattern sql.rank(X_0:any_1, X_1:bit, X_2
SQLrank;
return the ranked groups
sql
+read_dump_rel
+pattern sql.read_dump_rel(X_0:str):str
+SQLread_dump_rel;
+Reads sql_rel string into sql_rel object and then writes it to the return value
+sql
register
unsafe pattern sql.register(X_0:str, X_1:str, X_2:str, X_3:str):int
RAstatement2;
@@ -38274,6 +38279,11 @@ unsafe pattern sql.transaction_rollback(
SQLtransaction_rollback;
A transaction statement (type can be commit,release,rollback or start)
sql
+unclosed_result_sets
+pattern sql.unclosed_result_sets() (X_0:bat[:oid], X_1:bat[:int])
+sql_unclosed_result_sets;
+return query_id/res_id of unclosed result sets
+sql
unionfunc
pattern sql.unionfunc(X_0:str, X_1:str, X_2:any...):any...
SQLunionfunc;
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -351,6 +351,7 @@ void *GDKzalloc(size_t size) __attribute
void HASHdestroy(BAT *b);
BUN HASHlist(Hash *h, BUN i);
BUN HASHprobe(const Hash *h, const void *v);
+size_t HASHsize(BAT *b);
void HEAP_free(Heap *heap, var_t block);
gdk_return HEAP_initialize(Heap *heap, size_t nbytes, size_t nprivate, int
alignment);
var_t HEAP_malloc(BAT *b, size_t nbytes);
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -519,7 +519,7 @@
* zero is returned upon encountering an error or when the database value
* is NULL; this can be analyzed in using @code{mapi\_error()}.
*
- * @item size_t mapi_fetch_fiels_len(MapiHdl hdl, int fnr)
+ * @item size_t mapi_fetch_field_len(MapiHdl hdl, int fnr)
*
* Return the length of the C-string representation excluding trailing NULL
* byte of the value. Zero is returned upon encountering an error, when the
diff --git a/documentation/source/manual_pages/monetdbd.rst.in
b/documentation/source/manual_pages/monetdbd.rst.in
--- a/documentation/source/manual_pages/monetdbd.rst.in
+++ b/documentation/source/manual_pages/monetdbd.rst.in
@@ -251,6 +251,17 @@ using the **set** command. The following
use redirects instead of proxies. Changing this property takes effect
immediately at runtime.
+**keepalive**
+ Specifies the keepalive interval for incoming connections. If this is
+ set to a positive number, *monetdbd* configures the system to send
+ automatic periodic keepalive probes on all client connections. This
+ can help keep firewalls from killing connections that seem idle but
+ are in fact waiting for a long running query to finish. The default
+ is 60 seconds. When 127 consecutive probes have failed, the
+ connection is closed. With the default setting of 60 seconds this
+ means the connection is closed when the client has been unreachable
+ for more than two hours.
+
REMOTE DATABASES
================
diff --git a/gdk/CMakeLists.txt b/gdk/CMakeLists.txt
--- a/gdk/CMakeLists.txt
+++ b/gdk/CMakeLists.txt
@@ -64,6 +64,7 @@ target_sources(bat
gdk_string.c
gdk_qsort.c
gdk_qsort_impl.h
+ gdk_rsort.c
gdk_storage.c
gdk_bat.c
gdk_delta.c gdk_delta.h
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -744,7 +744,6 @@ typedef struct {
/* assert that atom width is power of 2, i.e., width == 1<<shift */
#define assert_shift_width(shift,width) assert(((shift) == 0 && (width) == 0)
|| ((unsigned)1<<(shift)) == (unsigned)(width))
-#define GDKLIBRARY_TAILN 061043U /* first in Jul2021: str offset heaps
names don't take width into account */
#define GDKLIBRARY_HASHASH 061044U /* first in Jul2021: hashash bit in
string heaps */
#define GDKLIBRARY_HSIZE 061045U /* first in Jan2022: heap "size" values
*/
#define GDKLIBRARY_JSON 061046U /* first in Sep2022: json storage
changes*/
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -2269,6 +2269,29 @@ do_sort(void *restrict h, void *restrict
{
if (n <= 1) /* trivially sorted */
return GDK_SUCCEED;
+ switch (tpe) {
+ case TYPE_bte:
+ case TYPE_sht:
+ case TYPE_int:
+ case TYPE_lng:
+#ifdef HAVE_HGE
+ case TYPE_hge:
+#endif
+ case TYPE_date:
+ case TYPE_daytime:
+ case TYPE_timestamp:
+ assert(base == NULL);
+ if (nilslast == reverse && (stable || n > 100))
+ return GDKrsort(h, t, n, hs, ts, reverse, false);
+ break;
+ case TYPE_uuid:
+ assert(base == NULL);
+ if (nilslast == reverse && (stable || n > 100))
+ return GDKrsort(h, t, n, hs, ts, reverse, true);
+ break;
+ default:
+ break;
+ }
if (stable) {
if (reverse)
return GDKssort_rev(h, t, base, n, hs, ts, tpe);
@@ -2420,7 +2443,7 @@ BATsort(BAT **sorted, BAT **order, BAT *
if (groups) {
if (BATtkey(b)) {
/* singleton groups */
- gn = BATdense(0, 0, BATcount(b));
+ gn = BATdense(b->hseqbase, 0, BATcount(b));
if (gn == NULL)
goto error;
} else {
@@ -2428,7 +2451,7 @@ BATsort(BAT **sorted, BAT **order, BAT *
const oid *o = 0;
assert(BATcount(b) == 1 ||
(b->tsorted && b->trevsorted));
- gn = BATconstant(0, TYPE_oid, &o, BATcount(b),
TRANSIENT);
+ gn = BATconstant(b->hseqbase, TYPE_oid, &o,
BATcount(b), TRANSIENT);
if (gn == NULL)
goto error;
}
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -906,26 +906,10 @@ BBPcheckbats(unsigned bbpversion)
/* first check string offset heap with width,
* then without */
if (MT_stat(path, &statb) < 0) {
-#ifdef GDKLIBRARY_TAILN
- if (b->ttype == TYPE_str &&
- b->twidth < SIZEOF_VAR_T) {
- size_t taillen = strlen(path) - 1;
- char tailsave = path[taillen];
- path[taillen] = 0;
- if (MT_stat(path, &statb) < 0) {
- GDKsyserror("cannot stat file
%s%c or %s (expected size %zu)\n",
- path, tailsave,
path, b->theap->free);
- GDKfree(path);
- return GDK_FAIL;
- }
- } else
-#endif
- {
- GDKsyserror("cannot stat file %s
(expected size %zu)\n",
- path, b->theap->free);
- GDKfree(path);
- return GDK_FAIL;
- }
+ GDKsyserror("cannot stat file %s (expected size
%zu)\n",
+ path, b->theap->free);
+ GDKfree(path);
+ return GDK_FAIL;
}
if ((size_t) statb.st_size < b->theap->free) {
GDKerror("file %s too small (expected %zu,
actual %zu)\n", path, b->theap->free, (size_t) statb.st_size);
@@ -1007,8 +991,7 @@ BBPheader(FILE *fp, int *lineno, bat *bb
bbpversion != GDKLIBRARY_STATUS &&
bbpversion != GDKLIBRARY_JSON &&
bbpversion != GDKLIBRARY_HSIZE &&
- bbpversion != GDKLIBRARY_HASHASH &&
- bbpversion != GDKLIBRARY_TAILN) {
+ bbpversion != GDKLIBRARY_HASHASH) {
TRC_CRITICAL(GDK, "incompatible BBP version: expected 0%o, got
0%o. "
"This database was probably created by a %s
version of MonetDB.",
GDKLIBRARY, bbpversion,
@@ -1424,56 +1407,6 @@ fixhashash(bat *hashbats, bat nhashbats)
}
#endif
-#ifdef GDKLIBRARY_TAILN
-static gdk_return
-movestrbats(void)
-{
- for (bat bid = 1, nbat = (bat) ATOMIC_GET(&BBPsize); bid < nbat; bid++)
{
- BAT *b = BBP_desc(bid);
- if (b->batCacheid == 0) {
- /* not a valid BAT */
- continue;
- }
- if (b->ttype != TYPE_str || b->twidth == SIZEOF_VAR_T ||
b->batCount == 0)
- continue;
- char *oldpath = GDKfilepath(0, BATDIR,
BBP_physical(b->batCacheid), "tail");
- char *newpath = GDKfilepath(0, BATDIR, b->theap->filename,
NULL);
- int ret = -1;
- if (oldpath != NULL && newpath != NULL) {
- struct stat oldst, newst;
- bool oldexist = MT_stat(oldpath, &oldst) == 0;
- bool newexist = MT_stat(newpath, &newst) == 0;
- if (newexist) {
- if (oldexist) {
- if (oldst.st_mtime > newst.st_mtime) {
- GDKerror("both %s and %s exist
with %s unexpectedly newer: manual intervention required\n", oldpath, newpath,
oldpath);
- ret = -1;
- } else {
- GDKwarning("both %s and %s
exist, removing %s\n", oldpath, newpath, oldpath);
- ret = MT_remove(oldpath);
- }
- } else {
- /* already good */
- ret = 0;
- }
- } else if (oldexist) {
- TRC_DEBUG(IO_, "rename %s to %s\n", oldpath,
newpath);
- ret = MT_rename(oldpath, newpath);
- } else {
- /* neither file exists: may be ok, but
- * will be checked later */
- ret = 0;
- }
- }
- GDKfree(oldpath);
- GDKfree(newpath);
- if (ret == -1)
- return GDK_FAIL;
- }
- return GDK_SUCCEED;
-}
-#endif
-
#ifdef GDKLIBRARY_JSON
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]