MonetDB: sch_rename_more_permissive - Close sch_rename_more_perm...

2024-04-10 Thread Lucas Pereira via checkin-list
Changeset: 98a66ccc33fb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/98a66ccc33fb
Branch: sch_rename_more_permissive
Log Message:

Close sch_rename_more_permissive branch

___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Merge with sch_rename_more_permissive branch

2024-04-10 Thread Lucas Pereira via checkin-list
Changeset: ea82ee04de3b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ea82ee04de3b
Branch: default
Log Message:

Merge with sch_rename_more_permissive branch


diffs (truncated from 717 to 300 lines):

diff --git a/sql/ChangeLog b/sql/ChangeLog
--- a/sql/ChangeLog
+++ b/sql/ChangeLog
@@ -1,7 +1,13 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
-* Tue Apr  8 2024 Joeri van Ruth 
+* Wed Apr 10 2024 Lucas Pereira 
+- Make schema renaming more permissive. A schema can be renamed if it
+  does not contain objects that are a dependency for objects outside
+  the schema. If such dependencies exist, they are shown in the
+  table sys.dependencies.
+
+* Tue Apr  8 2023 Joeri van Ruth 
 - Add a DECIMAL AS clause to COPY INTO that configures the decimal separator
   and thousands separator for decimals, temporal types and floats.
 
diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -5584,7 +5584,7 @@ cascade_ukey(backend *be, stmt **updates
 {
/* now iterate over all keys */
sql_trans *tr = be->mvc->session->tr;
-   list *keys = sql_trans_get_dependencies(tr, k->base.id, 
FKEY_DEPENDENCY, NULL);
+   list *keys = sql_trans_get_dependents(tr, k->base.id, FKEY_DEPENDENCY, 
NULL);
if (keys) {
for (node *n = keys->h; n; n = n->next->next) {
sqlid fkey_id = *(sqlid*)n->data;
@@ -6161,7 +6161,7 @@ sql_delete_ukey(backend *be, stmt *utids
sql_subtype *lng = sql_bind_localtype("lng");
sql_subtype *bt = sql_bind_localtype("bit");
sql_trans *tr = be->mvc->session->tr;
-   list *keys = sql_trans_get_dependencies(tr, k->base.id, 
FKEY_DEPENDENCY, NULL);
+   list *keys = sql_trans_get_dependents(tr, k->base.id, FKEY_DEPENDENCY, 
NULL);
 
if (keys) {
for (node *n = keys->h; n; n = n->next->next) {
@@ -6345,7 +6345,7 @@ check_for_foreign_key_references(mvc *sq
sql_key *k = n->data;
 
if (k->type == ukey || k->type == pkey) {
-   list *keys = sql_trans_get_dependencies(tr, 
k->base.id, FKEY_DEPENDENCY, NULL);
+   list *keys = sql_trans_get_dependents(tr, 
k->base.id, FKEY_DEPENDENCY, NULL);
 
if (keys) {
for (node *nn = keys->h; nn; nn = 
nn->next->next) {
diff --git a/sql/backends/monet5/sql_cat.c b/sql/backends/monet5/sql_cat.c
--- a/sql/backends/monet5/sql_cat.c
+++ b/sql/backends/monet5/sql_cat.c
@@ -38,12 +38,12 @@
 #include "orderidx.h"
 #include "sql_user.h"
 
-#define initcontext() \
-   if ((msg = getSQLContext(cntxt, mb, , NULL)) != NULL)\
-   return msg;\
-   if ((msg = checkSQLContext(cntxt)) != NULL)\
-   return msg;\
-   if (store_readonly(sql->session->tr->store))\
+#define initcontext()  
\
+   if ((msg = getSQLContext(cntxt, mb, , NULL)) != NULL)   
\
+   return msg; 
\
+   if ((msg = checkSQLContext(cntxt)) != NULL) 
\
+   return msg; 
\
+   if (store_readonly(sql->session->tr->store))
\
throw(SQL,"sql.cat",SQLSTATE(25006) "Schema statements cannot 
be executed on a readonly database.");
 
 static char *
@@ -1150,11 +1150,19 @@ alter_table(Client cntxt, mvc *sql, char
node *n;
 
if (!(s = mvc_bind_schema(sql, sname)))
-   throw(SQL,"sql.alter_table", SQLSTATE(3F000) "ALTER TABLE: no 
such schema '%s'", sname);
-   if (!mvc_schema_privs(sql, s) && !(isTempSchema(s) && t->persistence == 
SQL_LOCAL_TEMP))
-   throw(SQL,"sql.alter_table", SQLSTATE(42000) "ALTER TABLE: 
insufficient privileges for user '%s' in schema '%s'", 
get_string_global_var(sql, "current_user"), s->base.name);
+   throw(SQL,"sql.alter_table",
+ SQLSTATE(3F000) "ALTER TABLE: no such schema '%s'", 
sname);
+
+   if (!mvc_schema_privs(sql, s) &&
+   !(isTempSchema(s) && t->persistence == SQL_LOCAL_TEMP))
+   throw(SQL,"sql.alter_table",
+ SQLSTATE(42000) "ALTER TABLE: insufficient privileges 
for"
+ " user '%s' in schema '%s'",
+ get_string_global_var(sql, "current_user"), 
s->base.name);
+
if (!(nt = mvc_bind_table(sql, s, t->base.name)))
-   throw(SQL,"sql.alter_table", SQLSTATE(42S02) "ALTER TABLE: no 
such table '%s'", 

MonetDB: sch_rename_more_permissive - Improve ChangeLog entry

2024-04-10 Thread Lucas Pereira via checkin-list
Changeset: 69cdf104e312 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/69cdf104e312
Modified Files:
sql/ChangeLog
Branch: sch_rename_more_permissive
Log Message:

Improve ChangeLog entry


diffs (18 lines):

diff --git a/sql/ChangeLog b/sql/ChangeLog
--- a/sql/ChangeLog
+++ b/sql/ChangeLog
@@ -2,10 +2,10 @@
 # This file is updated with Maddlog
 
 * Wed Apr 10 2024 Lucas Pereira 
-- Schema renaming is more permissive. If schema does not contain objects
-  that are a dependency then schema renaming is allowed. If schema
-  contains objects that are dependencies, these are shown in system table
-  `dependencies` and schema renaming is not possible.
+- Make schema renaming more permissive. A schema can be renamed if it
+  does not contain objects that are a dependency for objects outside
+  the schema. If such dependencies exist, they are shown in the
+  table sys.dependencies.
 
 * Tue Apr  8 2023 Joeri van Ruth 
 - Add a DECIMAL AS clause to COPY INTO that configures the decimal separator
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: sch_rename_more_permissive - Typo

2024-04-10 Thread Lucas Pereira via checkin-list
Changeset: 572013ce474c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/572013ce474c
Modified Files:
sql/ChangeLog
Branch: sch_rename_more_permissive
Log Message:

Typo


diffs (16 lines):

diff --git a/sql/ChangeLog b/sql/ChangeLog
--- a/sql/ChangeLog
+++ b/sql/ChangeLog
@@ -4,10 +4,10 @@
 * Wed Apr 10 2024 Lucas Pereira 
 - Schema renaming is more permissive. If schema does not contain objects
   that are a dependency then schema renaming is allowed. If schema
-  containects that are dependencies, these are shown in system table
+  contains objects that are dependencies, these are shown in system table
   `dependencies` and schema renaming is not possible.
 
-* Tue Apr  8 2024 Joeri van Ruth 
+* Tue Apr  8 2023 Joeri van Ruth 
 - Add a DECIMAL AS clause to COPY INTO that configures the decimal separator
   and thousands separator for decimals, temporal types and floats.
 
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: sch_rename_more_permissive - Merge with default

2024-04-10 Thread Lucas Pereira via checkin-list
Changeset: 78fb24e315ba for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/78fb24e315ba
Branch: sch_rename_more_permissive
Log Message:

Merge with default


diffs (truncated from 633 to 300 lines):

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
@@ -25330,122 +25330,62 @@ SQLvar_pop;
 return the variance population of groups
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:bte]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:dbl]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:bte]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:flt]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:int]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:lng]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:dbl]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:sht]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bte):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:flt]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:dbl):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:int]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:flt):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:int):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:lng):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:lng]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:sht):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:bte]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:sht]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:dbl]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat?[:bte]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:flt]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:int]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:lng]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat?[:dbl]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:sht]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bte):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:dbl):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat?[:flt]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 

MonetDB: sch_rename_more_permissive - Add ChangeLog entry

2024-04-10 Thread Lucas Pereira via checkin-list
Changeset: e83ac5878dbe for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e83ac5878dbe
Modified Files:
sql/ChangeLog
Branch: sch_rename_more_permissive
Log Message:

Add ChangeLog entry


diffs (16 lines):

diff --git a/sql/ChangeLog b/sql/ChangeLog
--- a/sql/ChangeLog
+++ b/sql/ChangeLog
@@ -1,6 +1,12 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
+* Wed Apr 10 2024 Lucas Pereira 
+- Schema renaming is more permissive. If schema does not contain objects
+  that are a dependency then schema renaming is allowed. If schema
+  containects that are dependencies, these are shown in system table
+  `dependencies` and schema renaming is not possible.
+
 * Tue Apr  8 2024 Joeri van Ruth 
 - Add a DECIMAL AS clause to COPY INTO that configures the decimal separator
   and thousands separator for decimals, temporal types and floats.
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Adds more tests for union corresponding (OUTE...

2024-04-10 Thread stefanos mavros via checkin-list
Changeset: adb2e07dfbf8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/adb2e07dfbf8
Modified Files:
sql/test/Tests/union-corresponding.test
Branch: default
Log Message:

Adds more tests for union corresponding (OUTER and ALL variations)


diffs (140 lines):

diff --git a/sql/test/Tests/union-corresponding.test 
b/sql/test/Tests/union-corresponding.test
--- a/sql/test/Tests/union-corresponding.test
+++ b/sql/test/Tests/union-corresponding.test
@@ -113,7 +113,8 @@ two
 
 query I rowsort
 SELECT * FROM buz
-UNION CORRESPONDING BY (a)
+UNION 
+CORRESPONDING BY (a)
 SELECT * FROM bar
 
 3
@@ -121,4 +122,126 @@ 4
 5
 6
 
+query I rowsort
+SELECT * FROM foo
+UNION CORRESPONDING
+SELECT * FROM bar
+
+1
+2
+3
+4
 
+query I rowsort
+SELECT * FROM foo
+UNION 
+CORRESPONDING BY (a)
+SELECT * FROM bar
+
+1
+2
+3
+4
+
+statement error
+SELECT * FROM foo
+UNION 
+CORRESPONDING BY (b)
+SELECT * FROM bar
+
+statement error
+SELECT * FROM foo
+UNION 
+CORRESPONDING BY (c)
+SELECT * FROM bar
+
+query ITT rowsort
+SELECT * FROM foo
+OUTER UNION CORRESPONDING
+SELECT * FROM bar
+
+1
+alice
+NULL
+2
+bob
+NULL
+3
+NULL
+hello
+4
+NULL
+world
+
+query T rowsort
+SELECT * FROM foo
+OUTER UNION 
+CORRESPONDING BY (b)
+SELECT * FROM bar
+
+NULL
+alice
+bob
+
+query T rowsort
+SELECT * FROM foo
+OUTER UNION ALL
+CORRESPONDING BY (b)
+SELECT * FROM bar
+
+NULL
+NULL
+alice
+bob
+
+query T rowsort
+SELECT * FROM foo
+OUTER UNION 
+CORRESPONDING BY (c)
+SELECT * FROM bar
+
+NULL
+hello
+world
+
+query T rowsort
+SELECT * FROM foo
+OUTER UNION ALL
+CORRESPONDING BY (c)
+SELECT * FROM bar
+
+NULL
+NULL
+hello
+world
+
+query TT rowsort
+SELECT * FROM foo
+OUTER UNION 
+CORRESPONDING BY (c, b)
+SELECT * FROM bar
+
+NULL
+alice
+NULL
+bob
+hello
+NULL
+world
+NULL
+
+query TT rowsort
+SELECT * FROM foo
+OUTER UNION ALL
+CORRESPONDING BY (c, b)
+SELECT * FROM bar
+
+NULL
+alice
+NULL
+bob
+hello
+NULL
+world
+NULL
+
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - return null and cleanup instead of asserts

2024-04-10 Thread Niels Nes via checkin-list
Changeset: a690a976581c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a690a976581c
Modified Files:
sql/storage/bat/bat_storage.c
Branch: default
Log Message:

return null and cleanup instead of asserts


diffs (51 lines):

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
@@ -1136,7 +1136,8 @@ dict_append_bat(sql_trans *tr, sql_delta
return NULL;
BUN max_cnt = (BATcount(u) < 256)?256:64*1024;
if (DICTprepare4append(, i, u) < 0) {
-   assert(0);
+   bat_destroy(u);
+   return NULL;
} else {
int new = 0;
/* returns new offset bat (ie to be appended), possibly with 
larger type ! */
@@ -1255,7 +1256,8 @@ for_append_bat(column_storage *cs, BAT *
return NULL;
 
if (FORprepare4append(, i, offsetval, b->ttype) < 0) {
-   assert(0);
+   bat_destroy(b);
+   return NULL;
} else {
/* returns new offset bat if values within min/max, else 
decompress */
if (!newoffsets) { /* decompress */
@@ -1707,7 +1709,8 @@ dict_append_val(sql_trans *tr, sql_delta
return NULL;
BUN max_cnt = (BATcount(u) < 256)?256:64*1024;
if (DICTprepare4append_vals(, i, cnt, u) < 0) {
-   assert(0);
+   bat_destroy(u);
+   return NULL;
} else {
int new = 0;
/* returns new offset bat (ie to be appended), possibly with 
larger type ! */
@@ -1810,7 +1813,8 @@ for_append_val(column_storage *cs, void 
return NULL;
 
if (FORprepare4append_vals(, i, cnt, offsetval, tt, 
b->ttype) < 0) {
-   assert(0);
+   bat_destroy(b);
+   return NULL;
} else {
/* returns new offset bat if values within min/max, else 
decompress */
if (!newoffsets) {
@@ -4348,7 +4352,6 @@ static storage *
 savepoint_commit_storage( storage *dbat, ulng commit_ts)
 {
if (dbat && dbat->cs.ts == commit_ts && dbat->next) {
-   assert(0);
storage *od = dbat->next;
if (od->cs.ts == commit_ts) {
storage t = *od, *n = od->next;
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - no more TYPE_bat

2024-04-10 Thread Niels Nes via checkin-list
Changeset: 430e06cc7ace for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/430e06cc7ace
Modified Files:
monetdb5/optimizer/opt_for.c
Branch: default
Log Message:

no more TYPE_bat


diffs (33 lines):

diff --git a/monetdb5/optimizer/opt_for.c b/monetdb5/optimizer/opt_for.c
--- a/monetdb5/optimizer/opt_for.c
+++ b/monetdb5/optimizer/opt_for.c
@@ -15,9 +15,9 @@
 
 #if 0
 static InstrPtr
-ReplaceWithNil(MalBlkPtr mb, InstrPtr p, int pos, int tpe)
+ReplaceWithNil(MalBlkPtr mb, InstrPtr p, int pos)
 {
-   p = pushNil(mb, p, tpe);/* push at end */
+   p = pushNilBat(mb, p);  /* push at end */
getArg(p, pos) = getArg(p, p->argc - 1);
p->argc--;
return p;
@@ -239,7 +239,7 @@ OPTforImplementation(Client cntxt, MalBl
}
getArg(r, j) = vardictvalue[k];
if (cand)
-   r = ReplaceWithNil(mb, r, j + 
1, TYPE_bat); /* no candidate list */
+   r = ReplaceWithNil(mb, r, j + 
1);   /* no candidate list */
pushInstruction(mb, r);
 
int tpe = getVarType(mb, varisdict[k]);
@@ -263,7 +263,7 @@ OPTforImplementation(Client cntxt, MalBl
t = pushArgument(mb, t, varisdict[k]);
t = pushArgument(mb, t, getArg(s, 0));
t = pushArgument(mb, t, cand);
-   t = pushNil(mb, t, TYPE_bat);
+   t = pushNilBat(mb, t);
t = pushBit(mb, t, TRUE);   /* nil 
matches */
t = pushBit(mb, t, TRUE);   /* 
max_one */
t = pushNil(mb, t, TYPE_lng);   /* 
estimate */
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - code formating

2024-04-10 Thread Niels Nes via checkin-list
Changeset: 2bb94d49fdd6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2bb94d49fdd6
Modified Files:
monetdb5/mal/mal_session.c
Branch: default
Log Message:

code formating


diffs (13 lines):

diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -858,8 +858,7 @@ optimizeMALBlock(Client cntxt, MalBlkPtr
p = getInstrPtr(mb, pc);
if (getModuleId(p) == optimizerRef && p->fcn && p->token != 
REMsymbol) {
actions++;
-   msg = (*(str (*)(Client, MalBlkPtr, MalStkPtr, 
InstrPtr)) p->
-  fcn) (cntxt, mb, 0, p);
+   msg = (*(str (*)(Client, MalBlkPtr, MalStkPtr, 
InstrPtr)) p->fcn) (cntxt, mb, 0, p);
if (mb->errors) {
freeException(msg);
msg = mb->errors;
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - tmp buffer was moved to outer scope, move com...

2024-04-10 Thread Joeri van Ruth via checkin-list
Changeset: 27c678ad6f60 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/27c678ad6f60
Modified Files:
sql/backends/monet5/sql_result.c
Branch: default
Log Message:

tmp buffer was moved to outer scope, move comment with it


diffs (16 lines):

diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c
--- a/sql/backends/monet5/sql_result.c
+++ b/sql/backends/monet5/sql_result.c
@@ -458,10 +458,10 @@ fltdbl_frStr(Column *c, int type, const 
// 
+001.5e1
// will be rejected.
 
+   // According to Stack Overflow 
https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
+   // 24 bytes is a reasonable buffer but we'll make it a bit larger.
char tmp[120];
if (c->decskip || c->decsep != '.') {
-   // According to Stack Overflow 
https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
-   // 24 bytes is a reasonable buffer but we'll make it a bit 
larger.
char *p = [0];
 
while (GDKisspace(*s))
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Approve non-hge optional bat changes.

2024-04-10 Thread Sjoerd Mullender via checkin-list
Changeset: ddf6ccc1a753 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ddf6ccc1a753
Modified Files:
clients/Tests/MAL-signatures.test
Branch: default
Log Message:

Approve non-hge optional bat changes.


diffs (147 lines):

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
@@ -25330,122 +25330,62 @@ SQLvar_pop;
 return the variance population of groups
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:bte]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:dbl]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:bte]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:flt]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:int]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:lng]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:dbl]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat[:sht]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bte):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:flt]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:dbl):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:int]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:flt):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:int):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:lng):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:lng]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:sht):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:bte]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:any_1], X_1:int, X_2:int, X_3:int, 
X_4:bat?[:sht]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:dbl]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat?[:bte]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:flt]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:int]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:lng]):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat?[:dbl]):bat[:oid]
 SQLwindow_bound;
 computes window ranges for each row
 batsql
 window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat[:sht]):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bte):bat[:oid]
-SQLwindow_bound;
-computes window ranges for each row
-batsql
-window_bound
-pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:dbl):bat[:oid]
+pattern batsql.window_bound(X_0:bat[:bit], X_1:bat[:any_1], X_2:int, X_3:int, 
X_4:int, X_5:bat?[:flt]):bat[:oid]
 SQLwindow_bound;
 computes