Changeset: fbcb5aa397ec for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fbcb5aa397ec
Branch: default
Log Message:

Merge with Mar2025 branch.


diffs (183 lines):

diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -675,7 +675,7 @@ numFromStr(const char *src, size_t *len,
                                        return (ssize_t) (p - src);
                                }
                        }
-                       GDKerror("not a number");
+                       GDKerror("'%s' not a number\n", src);
                        goto bailout;
                case '-':
                        sign = -1;
@@ -686,7 +686,7 @@ numFromStr(const char *src, size_t *len,
                        break;
                }
                if (!GDKisdigit(*p)) {
-                       GDKerror("not a number");
+                       GDKerror("'%s' not a number\n", src);
                        goto bailout;
                }
        }
@@ -944,12 +944,12 @@ ptrFromStr(const char *src, size_t *len,
                        p += 2;
                }
                if (!GDKisxdigit(*p)) {
-                       GDKerror("not a number\n");
+                       GDKerror("'%s' not a number\n", src);
                        return -1;
                }
                while (GDKisxdigit(*p)) {
                        if (base >= ((size_t) 1 << (8 * sizeof(size_t) - 4))) {
-                               GDKerror("overflow\n");
+                               GDKerror("'%s' overflow\n", src);
                                return -1;
                        }
                        base = mult16(base) + base16(*p);
@@ -1013,7 +1013,7 @@ dblFromStr(const char *src, size_t *len,
                if (n == 0 || (errno == ERANGE && (d < -1 || d > 1))
                    || !isfinite(d) /* no NaN or Infinite */
                    ) {
-                       GDKerror("overflow or not a number\n");
+                       GDKerror("'%s' overflow or not a number\n", src);
                        return -1;
                } else {
                        while (src[n] && GDKisspace(src[n]))
@@ -1092,7 +1092,7 @@ fltFromStr(const char *src, size_t *len,
                n = (ssize_t) (p - src);
                if (n == 0 || (errno == ERANGE && (f < -1 || f > 1))
                    || !isfinite(f) /* no NaN or infinite */) {
-                       GDKerror("overflow or not a number\n");
+                       GDKerror("'%s' overflow or not a number\n", src);
                        return -1;
                } else {
                        while (src[n] && GDKisspace(src[n]))
@@ -1182,7 +1182,7 @@ OIDfromStr(const char *src, size_t *len,
                }
                p += pos;
        } else {
-               GDKerror("not an OID\n");
+               GDKerror("'%s' not an OID\n", src);
                return -1;
        }
        while (GDKisspace(*p))
@@ -1520,7 +1520,7 @@ BLOBfromstr(const char *instr, size_t *l
                if (GDKisxdigit(instr[i]))
                        nitems++;
                else if (!GDKisspace(instr[i])) {
-                       GDKerror("Illegal char in blob\n");
+                       GDKerror("Illegal char '%c' in blob\n", instr[i]);
                        return -1;
                }
        }
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -1181,10 +1181,12 @@ BATgroupstr_group_concat(BAT *b, BAT *g,
                goto done;
        }
 
-       if (BATtdense(g) || (g->tkey && g->tnonil)) {
+       if (ci.ncand == ngrp && (BATtdense(g) || (g->tkey && g->tnonil))) {
                /* trivial: singleton groups, so all results are equal
                 * to the inputs (but possibly a different type) */
                bn = BATconvert(b, s, TYPE_str, 0, 0, 0);
+               if (bn)
+                       bn->hseqbase = min;
                goto done;
        }
 
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -620,7 +620,7 @@ runMALsequence(Client cntxt, MalBlkPtr m
                                /* if still the same, replace lastprint with 
current
                                 * time and print the query */
                                if (ATOMIC_CAS(&cntxt->lastprint, &lp, t)) {
-                                       const char *q = cntxt->query ? 
cntxt->query : NULL;
+                                       const char *q = cntxt->query;
                                        TRC_INFO(MAL_SERVER,
                                                         "%s: query already 
running " LLFMT "s: %.200s\n",
                                                         cntxt->mythread ? 
cntxt->mythread : "?",
diff --git a/sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_13.test 
b/sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_13.test
--- a/sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_13.test
+++ b/sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_13.test
@@ -11,6 +11,7 @@ language P
 }
 
 statement ok
+# "normal" indentation
 CREATE FUNCTION pyapi13_mult(i integer,j integer) returns integer
 language PYTHON_MAP
 {
@@ -26,6 +27,7 @@ statement ok
 DROP FUNCTION pyapi13_mult
 
 statement ok
+# weird indentation
 CREATE FUNCTION pyapi13_mult(i integer,j integer) returns integer
 language PYTHON_MAP { return(i*j)
 }
@@ -39,6 +41,7 @@ statement ok
 DROP FUNCTION pyapi13_mult
 
 statement ok
+# no new line
 CREATE FUNCTION pyapi13_mult(i integer,j integer) returns integer language 
PYTHON_MAP { return(i*j) }
 
 query I rowsort
@@ -50,6 +53,7 @@ statement ok
 DROP FUNCTION pyapi13_mult
 
 statement ok
+# \n in string
 CREATE FUNCTION pyapi13_mult(i integer,j integer) returns integer
 language PYTHON_MAP
 {
@@ -67,6 +71,7 @@ statement ok
 DROP FUNCTION pyapi13_mult
 
 statement ok
+# multiline statement
 CREATE FUNCTION pyapi13_mult(i integer,j integer) returns integer
 language PYTHON_MAP
 {
@@ -91,6 +96,7 @@ statement ok
 DROP FUNCTION pyapi13_mult
 
 statement ok
+# inconsistent indentation (mix spaces and tabs, weird indentation)
 CREATE FUNCTION pyapi13_mult(i integer,j integer) returns integer
 language PYTHON_MAP
 {
diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -101,6 +101,7 @@ CLIENTprintinfo(void)
        char clbuf[64];
        char crbuf[64];
        char cpbuf[64];
+       char qybuf[200];
        struct tm tm;
 
        if (!MT_lock_trytime(&mal_contextLock, 1000)) {
@@ -125,6 +126,10 @@ CLIENTprintinfo(void)
                                strftime(tmbuf, sizeof(tmbuf), ", busy since %F 
%H:%M:%S%z", &tm);
                        } else
                                tmbuf[0] = 0;
+                       if (c->query)
+                               strconcat_len(qybuf, sizeof(qybuf), ", query: 
", c->query, NULL);
+                       else
+                               qybuf[0] = 0;
                        if (c->sqlcontext && ((backend *) c->sqlcontext)->mvc &&
                                ((backend *) c->sqlcontext)->mvc->session &&
                                ((backend *) c->sqlcontext)->mvc->session->tr) {
@@ -155,7 +160,7 @@ CLIENTprintinfo(void)
                                snprintf(cpbuf, sizeof(cpbuf), ", client pid: 
%ld", c->client_pid);
                        else
                                cpbuf[0] = 0;
-                       printf("client %d, user %s, thread %s, using %"PRIu64" 
bytes of transient space%s%s%s%s%s%s%s%s\n", c->idx, c->username, c->mythread ? 
c->mythread : "?", (uint64_t) ATOMIC_GET(&c->qryctx.datasize), mmbuf, tmbuf, 
trbuf, chbuf, cabuf, clbuf, cpbuf, crbuf);
+                       printf("client %d, user %s, thread %s, using %"PRIu64" 
bytes of transient space%s%s%s%s%s%s%s%s%s\n", c->idx, c->username, c->mythread 
? c->mythread : "?", (uint64_t) ATOMIC_GET(&c->qryctx.datasize), mmbuf, tmbuf, 
trbuf, chbuf, cabuf, clbuf, cpbuf, crbuf, qybuf);
                        break;
                case FINISHCLIENT:
                        /* finishing */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to