MonetDB: Oct2020 - Use the batch script on Windows.

2020-09-15 Thread Sjoerd Mullender
Changeset: 915f0c18cf34 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=915f0c18cf34
Modified Files:
testing/monetdb_mtest.bat.in
Branch: Oct2020
Log Message:

Use the batch script on Windows.


diffs (9 lines):

diff --git a/testing/monetdb_mtest.bat.in b/testing/monetdb_mtest.bat.in
--- a/testing/monetdb_mtest.bat.in
+++ b/testing/monetdb_mtest.bat.in
@@ -8,4 +8,4 @@
 
 set 
PATH=@CMAKE_INSTALL_FULL_LIBDIR@;@CMAKE_INSTALL_FULL_LIBDIR@\monetdb5;@CMAKE_INSTALL_FULL_BINDIR@;%PATH%
 cd "@CMAKE_HOME_DIRECTORY@"
-@CMAKE_INSTALL_FULL_BINDIR@/Mtest.py
+@CMAKE_INSTALL_FULL_BINDIR@/Mtest.py.bat
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: unlock - approved output

2020-09-15 Thread Niels Nes
Changeset: d6c4112c87ef for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d6c4112c87ef
Modified Files:
clients/Tests/exports.stable.out
monetdb5/optimizer/Tests/inline08.stable.out
sql/backends/monet5/rel_bin.c
sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out
sql/test/BugTracker-2015/Tests/readonly.Bug-3709.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-0join-view.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-query.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-view.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-query.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-view.stable.out
Branch: unlock
Log Message:

approved output


diffs (truncated from 454 to 300 lines):

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
@@ -205,7 +205,7 @@ void BATundo(BAT *b);
 BAT *BATunique(BAT *b, BAT *s);
 BAT *BATunmask(BAT *b);
 BBPrec *BBP[N_BBPINIT];
-gdk_return BBPaddfarm(const char *dirname, int rolemask, bool logerror);
+gdk_return BBPaddfarm(const char *dirname, uint32_t rolemask, bool logerror);
 void BBPclear(bat bid);
 BAT *BBPdescriptor(bat b);
 int BBPfix(bat b);
@@ -285,7 +285,7 @@ gdk_return GDKgetsem(int sem_id, int cou
 gdk_return GDKgetsemval(int sem_id, int number, int *semval);
 gdk_return GDKinit(struct opt *set, int setlen, bool embedded);
 void *GDKinitmmap(size_t id, size_t size, size_t *return_size);
-bool GDKinmemory(void);
+bool GDKinmemory(int farmid);
 ATOMIC_TYPE GDKlockcnt;
 ATOMIC_TYPE GDKlockcontentioncnt;
 MT_Lock *volatile GDKlocklist;
diff --git a/monetdb5/optimizer/Tests/inline08.stable.out 
b/monetdb5/optimizer/Tests/inline08.stable.out
--- a/monetdb5/optimizer/Tests/inline08.stable.out
+++ b/monetdb5/optimizer/Tests/inline08.stable.out
@@ -31,8 +31,25 @@ stdout of test 'inline08` in directory '
 function user.qry():void;  #[0] (0)  0 
 b:bat[:str] := bat.new(:str);  #[1] (0) CMDBATnew 1 <- 2 
 bat.append(b:bat[:str], "1":str);  #[2] (0) BKCappend_val_wrap 3 
<- 1 4 
-z:bat[:str] := mal.multiplex("user":str, "bar":str, b:bat[:str], 
b:bat[:str]); #[3] (0) MANIFOLDremapMultiplex 5 <- 6 7 1 1 
-end user.qry;  #[4] (0)  
+b:bat[:str] := batstr.replace(b:bat[:str], "A":str, "":str);   #[1] 
(0) STRbatReplacecst 1 <- 1 17 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "E":str, "":str);   #[2] 
(0) STRbatReplacecst 1 <- 1 19 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "I":str, "":str);   #[3] 
(0) STRbatReplacecst 1 <- 1 20 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "O":str, "":str);   #[4] 
(0) STRbatReplacecst 1 <- 1 21 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "U":str, "":str);   #[5] 
(0) STRbatReplacecst 1 <- 1 22 18 
+b:bat[:str] := batstr.replace(b:bat[:str], " ":str, "":str);   #[6] 
(0) STRbatReplacecst 1 <- 1 23 18 
+X_9:bat[:str] := b:bat[:str];  #[7] (0)  12 <- 1 
+b:bat[:str] := batstr.replace(b:bat[:str], "A":str, "":str);   #[1] 
(0) STRbatReplacecst 1 <- 1 17 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "E":str, "":str);   #[2] 
(0) STRbatReplacecst 1 <- 1 19 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "I":str, "":str);   #[3] 
(0) STRbatReplacecst 1 <- 1 20 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "O":str, "":str);   #[4] 
(0) STRbatReplacecst 1 <- 1 21 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "U":str, "":str);   #[5] 
(0) STRbatReplacecst 1 <- 1 22 18 
+b:bat[:str] := batstr.replace(b:bat[:str], " ":str, "":str);   #[6] 
(0) STRbatReplacecst 1 <- 1 23 18 
+X_10:bat[:str] := b:bat[:str]; #[7] (0)  13 <- 1 
+X_11:bat[:str] := batcalc.+(X_9:bat[:str], X_10:bat[:str], nil:BAT, 
nil:BAT);  #[3] (0) CMDbatADD 14 <- 12 13 28 29 
+z:bat[:str] := X_11:bat[:str]; #[4] (0)  5 <- 14 
+end user.qry;  #[19] (0)  
+#inline   actions= 0 time=3 usec 
+#remapactions= 1 time=153 usec 
 
 # 20:02:17 >  
 # 20:02:17 >  Done.
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
@@ -3971,7 +3971,7 @@ rel2bin_insert(backend *be, sql_rel *rel
stmt *is = m->data;
sql_idx *i = n->data;
 
-   if (non_updatable_index(i->type)) /* Some indexes don't 
hold delta structures */
+   if (non_updatable_index(i->type)) /* Some indexes don't 
hold delta structures */
   

MonetDB: typing - Approved output. The results for division with...

2020-09-15 Thread Pedro Ferreira
Changeset: 7c71b741b5fd for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7c71b741b5fd
Modified Files:
sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql
sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out
Branch: typing
Log Message:

Approved output. The results for division with month intervals needs validation


diffs (43 lines):

diff --git a/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql 
b/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql
--- a/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql
+++ b/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql
@@ -20,3 +20,11 @@ SELECT INTERVAL '1' MONTH * cast(1.0 as 
 SELECT INTERVAL '1' SECOND * cast(2.44 as double); -- 2.440
 SELECT INTERVAL '5' SECOND * cast(2.29 as real); -- 11.450
 SELECT INTERVAL '5' SECOND * cast(1.0 as double); -- 5.000
+
+SELECT INTERVAL '1' MONTH / cast(2.0 as double); -- 0
+SELECT INTERVAL '1' MONTH / cast(1.5 as double); -- 0
+SELECT INTERVAL '1' MONTH / cast(1.0 as double); -- 1
+
+SELECT INTERVAL '1' SECOND / cast(2.0 as double); -- 0.500
+SELECT INTERVAL '5' SECOND / cast(1.5 as double); -- 3.330
+SELECT INTERVAL '5' SECOND / cast(1.0 as double); -- 5.000
diff --git a/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out 
b/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out
--- a/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out
+++ b/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out
@@ -119,6 +119,24 @@ stdout of test 'interval-math.Bug-6935` 
 % sec_interval # type
 % 5 # length
 [ 5.000]
+#SELECT INTERVAL '1' SECOND / cast(2.0 as double); -- 0.500
+% .%2 # table_name
+% %2 # name
+% sec_interval # type
+% 5 # length
+[ 0.500]
+#SELECT INTERVAL '5' SECOND / cast(1.5 as double); -- 3.330
+% .%2 # table_name
+% %2 # name
+% sec_interval # type
+% 5 # length
+[ 3.333]
+#SELECT INTERVAL '5' SECOND / cast(1.0 as double); -- 5.000
+% .%2 # table_name
+% %2 # name
+% sec_interval # type
+% 5 # length
+[ 5.000]
 
 # 10:13:31 >  
 # 10:13:31 >  "Done."
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: typing - Approved no int-128 output

2020-09-15 Thread Pedro Ferreira
Changeset: e73a304ddd87 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e73a304ddd87
Modified Files:
clients/Tests/MAL-signatures.stable.out
Branch: typing
Log Message:

Approved no int-128 output


diffs (truncated from 791 to 300 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -1324,16 +1324,28 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:bte], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:dbl] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:lng] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:sht] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:flt] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:lng] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:sht] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:int], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:lng], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:lng] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:sht], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:sht] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bte, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:dbl] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:int] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:sht] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:flt] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:int] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:sht] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:int, 
X_3:bat[:oid]):bat[:int] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:lng, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:sht, 
X_3:bat[:oid]):bat[:sht] ",  "CMDbatMULsignal;", ""  ]
@@ -1362,49 +1374,85 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:flt], X_2:lng, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:flt], X_2:sht, 
X_3:bat[:oid]):bat[:flt] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bat[:bte], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;",   

MonetDB: typing - The division functions were in duplicated. Add...

2020-09-15 Thread Pedro Ferreira
Changeset: b1dc435d9d7d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b1dc435d9d7d
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
monetdb5/modules/mal/batcalc.c
monetdb5/modules/mal/calc.c
Branch: typing
Log Message:

The division functions were in duplicated. Added missing multiplication ones


diffs (truncated from 1639 to 300 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -2045,14 +2045,12 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:bte], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:lng] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:bte], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:sht] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatDIVsignal;", ""  ]
-[ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:dbl] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:flt] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:lng] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:sht] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatDIVsignal;", ""  ]
-[ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:dbl] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:flt] ", "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatDIVsignal;", ""  ]
@@ -2083,14 +2081,12 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bte, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:bte, 
X_3:bat[:oid]):bat[:sht] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatDIVsignal;", ""  ]
-[ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:dbl] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:flt] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:int] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:sht] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatDIVsignal;", ""  ]
-[ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:dbl] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:flt] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/","pattern batcalc./(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:int] ",  "CMDbatDIVsignal;", ""  ]
@@ -2313,14 +2309,12 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "/","pattern batcalc./(X_1:bte, X_2:bat[:bte], 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatDIVsignal;", ""  ]
 [ "batcalc",   "/",

MonetDB: default - Approve interface changes.

2020-09-15 Thread Sjoerd Mullender
Changeset: 2b419b9b064b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2b419b9b064b
Modified Files:
clients/Tests/exports.stable.out
Branch: default
Log Message:

Approve interface changes.


diffs (21 lines):

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
@@ -204,7 +204,7 @@ void BATtseqbase(BAT *b, oid o);
 void BATundo(BAT *b);
 BAT *BATunique(BAT *b, BAT *s);
 BBPrec *BBP[N_BBPINIT];
-gdk_return BBPaddfarm(const char *dirname, int rolemask, bool logerror);
+gdk_return BBPaddfarm(const char *dirname, uint32_t rolemask, bool logerror);
 void BBPclear(bat bid);
 BAT *BBPdescriptor(bat b);
 int BBPfix(bat b);
@@ -283,7 +283,7 @@ gdk_return GDKgetsem(int sem_id, int cou
 gdk_return GDKgetsemval(int sem_id, int number, int *semval);
 gdk_return GDKinit(struct opt *set, int setlen, bool embedded);
 void *GDKinitmmap(size_t id, size_t size, size_t *return_size);
-bool GDKinmemory(void);
+bool GDKinmemory(int farmid);
 ATOMIC_TYPE GDKlockcnt;
 ATOMIC_TYPE GDKlockcontentioncnt;
 MT_Lock *volatile GDKlocklist;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: unlock - Merge with default branch.

2020-09-15 Thread Sjoerd Mullender
Changeset: 8f0ed6e64146 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8f0ed6e64146
Modified Files:
ChangeLog
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
gdk/gdk.h
gdk/gdk_align.c
gdk/gdk_bat.c
gdk/gdk_bbp.c
gdk/gdk_bbp.h
gdk/gdk_calc.c
gdk/gdk_group.c
gdk/gdk_hash.c
gdk/gdk_heap.c
gdk/gdk_imprints.c
gdk/gdk_join.c
gdk/gdk_logger.c
gdk/gdk_logger_old.c
gdk/gdk_orderidx.c
gdk/gdk_private.h
gdk/gdk_storage.c
gdk/gdk_tm.c
geom/monetdb5/geom.c
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_profiler.c
monetdb5/modules/kernel/bat5.c
monetdb5/modules/kernel/batstr.c
monetdb5/modules/mal/pcre.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql.h
sql/backends/monet5/sql_cat.c
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/sql_statement.c
sql/include/sql_catalog.h
sql/include/sql_relation.h
sql/server/rel_optimizer.c
sql/storage/bat/bat_storage.c
sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-0join-view.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-query.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-view.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-query.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-view.stable.out
sql/test/miscellaneous/Tests/groupby_error.stable.out
tools/monetdbe/monetdbe.c
Branch: unlock
Log Message:

Merge with default branch.


diffs (truncated from 11918 to 300 lines):

diff --git a/ChangeLog.Oct2020 b/ChangeLog.Oct2020
--- a/ChangeLog.Oct2020
+++ b/ChangeLog.Oct2020
@@ -1,6 +1,22 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Mon Aug 10 2020 Ying Zhang 
+- Finished a first version of the new monitoring function
+  user_statistics(), which is only intended for the DBAs.
+  For each database user who has logged in during the current mserver5
+  session, it returns
+  "username": login name of the database user,
+  "querycount": the number of queries this user has executed since his/her
+  first login,
+  "totalticks": the total execution time (in microsecond) of the queries ran
+  by this user,
+  "maxquery": the query with the longest execution time (if two queries have
+  the same execution time, the newer overwrites the older),
+  "maxticks": the execution time of the 'maxquery' (in microsecond),
+  "started": the start timestamp of the 'maxquery',
+  "finished": the finish timestamp of the 'maxquery'.
+
 * Wed Jun 10 2020 Sjoerd Mullender 
 - Removed support for LiDAR data, that is the SQL procedures
   sys.lidarattach, sys.lidarload, and sys.lidarexport.
diff --git a/ChangeLog.userstats b/ChangeLog.userstats
deleted file mode 100644
--- a/ChangeLog.userstats
+++ /dev/null
@@ -1,19 +0,0 @@
-# ChangeLog file for userstats
-# This file is updated with Maddlog
-
-* Mon Aug 10 2020 Ying Zhang 
-- Finished a first version of the new monitoring function
-  user_statistics(), which is only intended for the DBAs.
-  For each database user who has logged in during the current mserver5
-  session, it returns 
-  "username": login name of the database user,
-  "querycount": the number of queries this user has executed since his/her
-  first login,
-  "totalticks": the total execution time (in microsecond) of the queries ran
-  by this user,
-  "maxquery": the query with the longest execution time (if two queries have
-  the same execution time, the newer overwrites the older),
-  "maxticks": the execution time of the 'maxquery' (in microsecond),
-  "started": the start timestamp of the 'maxquery',
-  "finished": the finish timestamp of the 'maxquery'.
-
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -116,9 +116,14 @@ BuildRequires: gcc
 BuildRequires: bison
 BuildRequires: /usr/bin/python3
 %if %{?rhel:1}%{!?rhel:0}
+# RH 7 (and for readline also 8)
 BuildRequires: bzip2-devel
+BuildRequires: unixODBC-devel
+BuildRequires: readline-devel
 %else
 BuildRequires: pkgconfig(bzip2)
+BuildRequires: pkgconfig(odbc)
+BuildRequires: pkgconfig(readline)
 %endif
 %if %{with fits}
 BuildRequires: pkgconfig(cfitsio)
@@ -128,23 +133,19 @@ BuildRequires: geos-devel >= 3.4.0
 %endif
 BuildRequires: pkgconfig(libcurl)
 BuildRequires: 

MonetDB: mtest - fix mktest

2020-09-15 Thread svetlin
Changeset: d7c71dea5dbe for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d7c71dea5dbe
Modified Files:
sql/test/SQLite_regress/sqllogictest/Tests/select1.test
sql/test/null/sqllogictest/Tests/coalesce.test
sql/test/null/sqllogictest/Tests/coalesce2.test
sql/test/null/sqllogictest/Tests/coalesce3.test
testing/mktest.py
Branch: mtest
Log Message:

fix mktest


diffs (67 lines):

diff --git a/sql/test/SQLite_regress/sqllogictest/Tests/select1.test 
b/sql/test/SQLite_regress/sqllogictest/Tests/select1.test
--- a/sql/test/SQLite_regress/sqllogictest/Tests/select1.test
+++ b/sql/test/SQLite_regress/sqllogictest/Tests/select1.test
@@ -96,7 +96,7 @@ SELECT CASE WHEN c>(SELECT avg(c) FROM t
   FROM t1
  ORDER BY 1
 
-30 values hashing to 3c13dee48d9356ae19af2515e05e6b54
+30 values hashing to 3c13dee48d9356ae19af2515e05e6b5
 
 query II nosort
 SELECT a+b*2+c*3+d*4+e*5,
diff --git a/sql/test/null/sqllogictest/Tests/coalesce.test 
b/sql/test/null/sqllogictest/Tests/coalesce.test
--- a/sql/test/null/sqllogictest/Tests/coalesce.test
+++ b/sql/test/null/sqllogictest/Tests/coalesce.test
@@ -51,7 +51,6 @@ FROM my_table2 y WHERE y.col1 = x.col1)
 FROM (
   SELECT * FROM my_table1
  ) x
-
 
 10 values hashing to e0145663d590ae02decc8cdc9071e0c2
 
diff --git a/sql/test/null/sqllogictest/Tests/coalesce2.test 
b/sql/test/null/sqllogictest/Tests/coalesce2.test
--- a/sql/test/null/sqllogictest/Tests/coalesce2.test
+++ b/sql/test/null/sqllogictest/Tests/coalesce2.test
@@ -48,7 +48,6 @@ SELECT (SELECT y.col2 FROM my_table2 y W
 FROM (
   SELECT * FROM my_table1
  ) x
-
 
 10 values hashing to da0f81f3773ec10b245318fdf05e21ce
 
@@ -57,7 +56,6 @@ SELECT COALESCE((SELECT y.col2 FROM my_t
 FROM (
   SELECT * FROM my_table1
  ) x
-
 
 10 values hashing to e0145663d590ae02decc8cdc9071e0c2
 
diff --git a/sql/test/null/sqllogictest/Tests/coalesce3.test 
b/sql/test/null/sqllogictest/Tests/coalesce3.test
--- a/sql/test/null/sqllogictest/Tests/coalesce3.test
+++ b/sql/test/null/sqllogictest/Tests/coalesce3.test
@@ -50,7 +50,6 @@ FROM (
   SELECT * FROM my_table1
  ) x
 ORDER BY id
-
 
 20 values hashing to 90517be8b415ee2ec661c591e9f0c97f
 
diff --git a/testing/mktest.py b/testing/mktest.py
--- a/testing/mktest.py
+++ b/testing/mktest.py
@@ -77,7 +77,9 @@ while True:
 if '--' in line:
 line = line[:line.index('--')].rstrip()
 if line.endswith(';'):
-query.append(line.rstrip(';'))
+stripped = line.rstrip(';')
+if stripped !='':
+query.append(stripped)
 query = '\n'.join(query)
 try:
 crs.execute(query)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mtest - merge with Jun2020

2020-09-15 Thread svetlin
Changeset: d44f09bcb3cc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d44f09bcb3cc
Modified Files:
sql/server/rel_optimizer.c
testing/Mtest.py.in
Branch: mtest
Log Message:

merge with Jun2020


diffs (64 lines):

diff --git a/monetdb5/optimizer/opt_generator.c 
b/monetdb5/optimizer/opt_generator.c
--- a/monetdb5/optimizer/opt_generator.c
+++ b/monetdb5/optimizer/opt_generator.c
@@ -71,14 +71,11 @@ OPTgeneratorImplementation(Client cntxt,
char buf[256];
lng usec= GDKusec();
str msg = MAL_SUCCEED;
+   int needed = 0;
 
-   (void) cntxt;
(void) stk;
(void) pci;
 
-   series = (InstrPtr*) GDKzalloc(sizeof(InstrPtr) * mb->vtop);
-   if(series == NULL)
-   throw(MAL,"optimizer.generator", SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
old = mb->stmt;
limit = mb->stop;
slimit = mb->ssize;
@@ -87,12 +84,16 @@ OPTgeneratorImplementation(Client cntxt,
for( i=0; i < limit; i++){
p = old[i];
if ( getModuleId(p) == generatorRef && getFunctionId(p) == 
seriesRef)
-   break;
+   needed = 1;
+   if (p->token == RETURNsymbol || p->barrier == RETURNsymbol)
+   return 0;
}
-   if (i == limit) {
-   GDKfree(series);
+   if (!needed)
return 0;
-   }
+
+   series = (InstrPtr*) GDKzalloc(sizeof(InstrPtr) * mb->vtop);
+   if(series == NULL)
+   throw(MAL,"optimizer.generator", SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
 
if (newMalBlkStmt(mb, mb->ssize) < 0) {
GDKfree(series);
diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -5527,7 +5527,7 @@ rel_push_project_down(visitor *v, sql_re
 
if (rel_is_ref(l))
return rel;
-   if (is_base(l->op)) {
+   if (is_basetable(l->op)) {
if (list_check_prop_all(rel->exps, 
(prop_check_func)_is_useless_rename)) {
/* TODO reduce list (those in the project + 
internal) */
rel->l = NULL;
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3225,7 +3225,7 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
 break
 elif CALL == "sqltest":
 import MonetDBtesting.sqllogictest as sqllogictest
-sql = sqllogictest.SQLLogic(ClntErr)
+sql = sqllogictest.SQLLogic(out=ClntErr)
 try:
 sql.connect(hostname='localhost',
 port=int(env['MAPIPORT']),
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: typing - Merged with Oct2020

2020-09-15 Thread Pedro Ferreira
Changeset: 2134a22996ff for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2134a22996ff
Branch: typing
Log Message:

Merged with Oct2020


diffs (truncated from 822 to 300 lines):

diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -5600,6 +5600,12 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(const TY
 #define rounddbl(x)round(x)
 #endif
 
+#define absbte(x)  abs(x)
+#define abssht(x)  abs(x)
+#define absint(x)  abs(x)
+#define abslng(x)  llabs(x)
+#define abshge(x)  ABSOLUTE(x)
+
 #define MUL_INT_FLT_INT(TYPE1, TYPE2, TYPE3)   \
 static BUN \
 mul_##TYPE1##_##TYPE2##_##TYPE3(   \
@@ -5622,7 +5628,7 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(  
\
nils++; \
} else if (lft[i] == 0 || rgt[j] == 0) {\
dst[k] = 0; \
-   } else if (max / rgt[i] < lft[j]) { \
+   } else if (max / fabs(rgt[j]) < abs##TYPE1(lft[i])) { \
if (abort_on_error) \
ON_OVERFLOW(TYPE1, TYPE2, "*"); \
dst[k] = TYPE3##_nil;   \
@@ -5643,7 +5649,7 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(  
\
nils++; \
} else if (lft[i] == 0 || rgt[j] == 0) {\
dst[k] = 0; \
-   } else if (max / rgt[i] < lft[j]) { \
+   } else if (max / fabs(rgt[j]) < abs##TYPE1(lft[i])) { \
if (abort_on_error) \
ON_OVERFLOW(TYPE1, TYPE2, "*"); \
dst[k] = TYPE3##_nil;   \
@@ -5661,17 +5667,27 @@ MUL_INT_FLT_INT(bte, flt, bte)
 MUL_INT_FLT_INT(bte, flt, sht)
 MUL_INT_FLT_INT(bte, flt, int)
 MUL_INT_FLT_INT(bte, flt, lng)
+MUL_INT_FLT_INT(sht, flt, bte)
 MUL_INT_FLT_INT(sht, flt, sht)
 MUL_INT_FLT_INT(sht, flt, int)
 MUL_INT_FLT_INT(sht, flt, lng)
+MUL_INT_FLT_INT(int, flt, bte)
+MUL_INT_FLT_INT(int, flt, sht)
 MUL_INT_FLT_INT(int, flt, int)
 MUL_INT_FLT_INT(int, flt, lng)
+MUL_INT_FLT_INT(lng, flt, bte)
+MUL_INT_FLT_INT(lng, flt, sht)
+MUL_INT_FLT_INT(lng, flt, int)
 MUL_INT_FLT_INT(lng, flt, lng)
 #ifdef HAVE_HGE
 MUL_INT_FLT_INT(bte, flt, hge)
 MUL_INT_FLT_INT(sht, flt, hge)
 MUL_INT_FLT_INT(int, flt, hge)
 MUL_INT_FLT_INT(lng, flt, hge)
+MUL_INT_FLT_INT(hge, flt, bte)
+MUL_INT_FLT_INT(hge, flt, sht)
+MUL_INT_FLT_INT(hge, flt, int)
+MUL_INT_FLT_INT(hge, flt, lng)
 MUL_INT_FLT_INT(hge, flt, hge)
 #endif
 
@@ -5679,17 +5695,27 @@ MUL_INT_FLT_INT(bte, dbl, bte)
 MUL_INT_FLT_INT(bte, dbl, sht)
 MUL_INT_FLT_INT(bte, dbl, int)
 MUL_INT_FLT_INT(bte, dbl, lng)
+MUL_INT_FLT_INT(sht, dbl, bte)
 MUL_INT_FLT_INT(sht, dbl, sht)
 MUL_INT_FLT_INT(sht, dbl, int)
 MUL_INT_FLT_INT(sht, dbl, lng)
+MUL_INT_FLT_INT(int, dbl, bte)
+MUL_INT_FLT_INT(int, dbl, sht)
 MUL_INT_FLT_INT(int, dbl, int)
 MUL_INT_FLT_INT(int, dbl, lng)
+MUL_INT_FLT_INT(lng, dbl, bte)
+MUL_INT_FLT_INT(lng, dbl, sht)
+MUL_INT_FLT_INT(lng, dbl, int)
 MUL_INT_FLT_INT(lng, dbl, lng)
 #ifdef HAVE_HGE
 MUL_INT_FLT_INT(bte, dbl, hge)
 MUL_INT_FLT_INT(sht, dbl, hge)
 MUL_INT_FLT_INT(int, dbl, hge)
 MUL_INT_FLT_INT(lng, dbl, hge)
+MUL_INT_FLT_INT(hge, dbl, bte)
+MUL_INT_FLT_INT(hge, dbl, sht)
+MUL_INT_FLT_INT(hge, dbl, int)
+MUL_INT_FLT_INT(hge, dbl, lng)
 MUL_INT_FLT_INT(hge, dbl, hge)
 #endif
 
@@ -6383,6 +6409,13 @@ mul_typeswitchloop(const void *lft, int 
 #endif
case TYPE_flt:
switch (tp) {
+   case TYPE_bte:
+   nils = mul_sht_flt_bte(lft, incr1, rgt, incr2,
+  dst, GDK_bte_max,
+  ci1, ci2,
+  candoff1, candoff2,
+  abort_on_error);
+   break;
case TYPE_sht:
nils = mul_sht_flt_sht(lft, incr1, rgt, incr2,
   dst, GDK_sht_max,
@@ -6431,6 +6464,13 @@ mul_typeswitchloop(const void *lft, int 
break;
case TYPE_dbl:
switch (tp) {
+   case TYPE_bte:
+   nils = mul_sht_dbl_bte(lft, incr1, rgt, incr2,
+  dst, GDK_bte_max,
+  

MonetDB: typing - Removed usued calc.* calls and added calc./ be...

2020-09-15 Thread Pedro Ferreira
Changeset: ae280b32e4c8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae280b32e4c8
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
monetdb5/modules/mal/batcalc.c
monetdb5/modules/mal/calc.c
Branch: typing
Log Message:

Removed usued calc.* calls and added calc./ between integers and 
floating-points returning integers


diffs (truncated from 1445 to 300 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -1322,13 +1322,17 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "*","pattern batcalc.*(X_1:sht, X_2:bat[:sht], 
X_3:bat[:oid]):bat[:int] ",  "CMDbatMULenlarge;",""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:sht, X_2:bat[:sht], 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULenlarge;",""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:bte], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:dbl] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:bte] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:flt] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:int], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:lng], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:lng] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bat[:sht], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:sht] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:bte, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:dbl, 
X_3:bat[:oid]):bat[:dbl] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:bte] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:flt, 
X_3:bat[:oid]):bat[:flt] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:int, 
X_3:bat[:oid]):bat[:int] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:bte], X_2:lng, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
@@ -1359,18 +1363,24 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:flt], X_2:sht, 
X_3:bat[:oid]):bat[:flt] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bat[:bte], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:dbl] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bat[:dbl], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:flt] ", "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bat[:flt], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bat[:int], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bat[:lng], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:lng] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bat[:sht], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:int] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:bte, 
X_3:bat[:oid]):bat[:int] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:dbl, 
X_3:bat[:oid]):bat[:dbl] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:int], X_2:dbl, 
X_3:bat[:oid]):bat[:int] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*", 

MonetDB: monetdbe-proxy - Fix redundant flush bug and refine rem...

2020-09-15 Thread Aris Koning
Changeset: 602d7a1062ed for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=602d7a1062ed
Modified Files:
ctest/tools/monetdbe/example_proxy.c
monetdb5/modules/mal/remote.c
sql/backends/monet5/sql_result.c
tools/monetdbe/monetdbe.c
Branch: monetdbe-proxy
Log Message:

Fix redundant flush bug and refine remote's MAPI result handling.


diffs (184 lines):

diff --git a/ctest/tools/monetdbe/example_proxy.c 
b/ctest/tools/monetdbe/example_proxy.c
--- a/ctest/tools/monetdbe/example_proxy.c
+++ b/ctest/tools/monetdbe/example_proxy.c
@@ -34,6 +34,9 @@ main(void)
error("Failed to open database")
 
// Assumes the existance of a table test (x INT, y STRING)  on the 
remote.
+   if ((err = monetdbe_query(mdbe, "INSERT INTO test VALUES (100, 
'WHAAT'); ", NULL, NULL)) != NULL)
+   error(err)
+
if ((err = monetdbe_query(mdbe, "SELECT x, y FROM test; ", , 
NULL)) != NULL)
error(err)
 
@@ -76,6 +79,55 @@ main(void)
 
if ((err = monetdbe_cleanup_result(mdbe, result)) != NULL)
error(err)
+
+   if ((err = monetdbe_query(mdbe, "DELETE FROM test where x = 100;", 
NULL, NULL)) != NULL)
+   error(err)
+
+
+   if ((err = monetdbe_query(mdbe, "SELECT x, y, 1 AS some_int FROM test 
WHERE x > 10; ", , NULL)) != NULL)
+   error(err)
+
+   fprintf(stdout, "Query result with %zu cols and %"PRId64" rows\n", 
result->ncols, result->nrows);
+   for (int64_t r = 0; r < result->nrows; r++) {
+   for (size_t c = 0; c < result->ncols; c++) {
+   monetdbe_column* rcol;
+   if ((err = monetdbe_result_fetch(result, , c)) != 
NULL)
+   error(err)
+   switch (rcol->type) {
+   case monetdbe_int32_t: {
+   monetdbe_column_int32_t * col = 
(monetdbe_column_int32_t *) rcol;
+   if (col->data[r] == col->null_value) {
+   printf("NULL");
+   } else {
+   printf("%d", col->data[r]);
+   }
+   break;
+   }
+   case monetdbe_str: {
+   monetdbe_column_str * col = 
(monetdbe_column_str *) rcol;
+   if (col->is_null(col->data[r])) {
+   printf("NULL");
+   } else {
+   printf("%s", (char*) 
col->data[r]);
+   }
+   break;
+   }
+   default: {
+   printf("UNKNOWN");
+   }
+   }
+
+   if (c + 1 < result->ncols) {
+   printf(", ");
+   }
+   }
+   printf("\n");
+   }
+
+   if ((err = monetdbe_cleanup_result(mdbe, result)) != NULL)
+   error(err)
+
+
if (monetdbe_close(mdbe))
error("Failed to close database")
return 0;
diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c
--- a/monetdb5/modules/mal/remote.c
+++ b/monetdb5/modules/mal/remote.c
@@ -1102,7 +1102,7 @@ str RMTexec(Client cntxt, MalBlkPtr mb, 
 
/* Temporary hack:
 * use a callback to immediately handle columnar results before hdl is 
destroyed. */
-   if(tmp == MAL_SUCCEED && rcb && mhdl) {
+   if(tmp == MAL_SUCCEED && rcb && mhdl && mapi_get_field_count(mhdl) == 
Q_TABLE) {
 
int fields = mapi_get_field_count(mhdl);
 
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
@@ -953,8 +953,6 @@ mvc_export_binary_bat(stream *s, BAT* bn
if (sendtheap)
mnstr_write(s, /* theap */ Tbase(bn), 
bn->tvheap->free, 1);
}
-
-   mnstr_flush(s);
 }
 
 static int
@@ -996,9 +994,9 @@ mvc_export_prepare_columnar(stream *out,
if (BUNappend(btype,>type->localtype 
, false) != GDK_SUCCEED ||
BUNappend(bdigits,  >digits  
, false) != GDK_SUCCEED ||
BUNappend(bscale,   >scale   
, false) != GDK_SUCCEED ||
-   BUNappend(bschema,   
, false) != GDK_SUCCEED ||
-

MonetDB: monetdbe-proxy - Add support for columnar format in mvc...

2020-09-15 Thread Aris Koning
Changeset: f09d1d5bedd4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f09d1d5bedd4
Modified Files:
sql/backends/monet5/sql_execute.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/sql_result.h
sql/backends/monet5/sql_scenario.c
Branch: monetdbe-proxy
Log Message:

Add support for columnar format in mvc_export_prepare.


diffs (292 lines):

diff --git a/sql/backends/monet5/sql_execute.c 
b/sql/backends/monet5/sql_execute.c
--- a/sql/backends/monet5/sql_execute.c
+++ b/sql/backends/monet5/sql_execute.c
@@ -544,7 +544,7 @@ SQLstatementIntern(Client c, str *expr, 
}
 
if (!err)
-   err = mvc_export_prepare(m, c->fdout, 
be->q, "");
+   err = mvc_export_prepare(be, c->fdout, 
"");
}
}
 
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
@@ -919,9 +919,130 @@ mvc_export_warning(stream *s, str w)
return (1);
 }
 
+static void
+mvc_export_binary_bat(stream *s, BAT* bn) {
+   bool sendtheap = bn->ttype != TYPE_void && bn->tvarsized;
+
+   mnstr_printf(s, /*JSON*/"{"
+   "\"version\":1,"
+   "\"ttype\":%d,"
+   "\"hseqbase\":" OIDFMT ","
+   "\"tseqbase\":" OIDFMT ","
+   "\"tsorted\":%d,"
+   "\"trevsorted\":%d,"
+   "\"tkey\":%d,"
+   "\"tnonil\":%d,"
+   "\"tdense\":%d,"
+   "\"size\":" BUNFMT ","
+   "\"tailsize\":%zu,"
+   "\"theapsize\":%zu"
+   "}\n",
+   bn->ttype,
+   bn->hseqbase, bn->tseqbase,
+   bn->tsorted, bn->trevsorted,
+   bn->tkey,
+   bn->tnonil,
+   BATtdense(bn),
+   bn->batCount,
+   (size_t)bn->batCount * Tsize(bn),
+   sendtheap && bn->batCount > 0 ? 
bn->tvheap->free : 0
+   );
+
+   if (bn->batCount > 0) {
+   mnstr_write(s, /* tail */ Tloc(bn, 0), bn->batCount * 
Tsize(bn), 1);
+   if (sendtheap)
+   mnstr_write(s, /* theap */ Tbase(bn), 
bn->tvheap->free, 1);
+   }
+
+   mnstr_flush(s);
+}
+
+static int
+mvc_export_prepare_columnar(stream *out, cq *q, int nrows, sql_rel *r) {
+   int error = -1;
+
+   BAT* btype  = COLnew(0, TYPE_int, nrows, TRANSIENT);
+   BAT* bdigits= COLnew(0, TYPE_int, nrows, TRANSIENT);
+   BAT* bscale = COLnew(0, TYPE_int, nrows, TRANSIENT);
+   BAT* bschema= COLnew(0, TYPE_str, nrows, TRANSIENT);
+   BAT* btable = COLnew(0, TYPE_str, nrows, TRANSIENT);
+   BAT* bcolumn= COLnew(0, TYPE_str, nrows, TRANSIENT);
+
+   node *n;
+   sql_subtype *t;
+   sql_arg *a;
+   if (r && is_project(r->op) && r->exps) {
+   for (n = r->exps->h; n; n = n->next) {
+   const char *name, *rname, *schema = NULL;
+   sql_exp *e = n->data;
+
+   t = exp_subtype(e);
+   name = exp_name(e);
+   if (!name && e->type == e_column && e->r)
+   name = e->r;
+   rname = exp_relname(e);
+   if (!rname && e->type == e_column && e->l)
+   rname = e->l;
+
+   if (!schema)
+   schema = "";
+
+   if (!rname)
+   rname = "";
+
+   if (!name)
+   name = "";
+
+   if (BUNappend(btype,>type->localtype 
, false) != GDK_SUCCEED ||
+   BUNappend(bdigits,  >digits  
, false) != GDK_SUCCEED ||
+   BUNappend(bscale,   >scale   
, false) != GDK_SUCCEED ||
+   BUNappend(bschema,   
, false) != GDK_SUCCEED ||
+   BUNappend(btable, 
, false) != GDK_SUCCEED ||
+   BUNappend(bcolumn, 
, false) != GDK_SUCCEED)
+ 

MonetDB: monetdbe-proxy - Simplify mvc_export_prepare.

2020-09-15 Thread Aris Koning
Changeset: e4bfae33a5be for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4bfae33a5be
Modified Files:
sql/backends/monet5/sql_result.c
Branch: monetdbe-proxy
Log Message:

Simplify mvc_export_prepare.


diffs (198 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
@@ -932,97 +932,96 @@ mvc_export_prepare(mvc *c, stream *out, 
sql_rel *r = q->rel;
 
(void)c;
-   if(!out)
+   if(!out || GDKembedded())
return 0;
 
-   if (!GDKembedded()) {
-   if (r && (is_topn(r->op) || is_sample(r->op)))
-   r = r->l;
-   if (r && is_project(r->op) && r->exps) {
-   unsigned int max2 = 10, max3 = 10;  /* to help 
calculate widths */
-   nrows += list_length(r->exps);
-
-   for (n = r->exps->h; n; n = n->next) {
-   const char *name;
-   sql_exp *e = n->data;
-   size_t slen;
+   if (r && (is_topn(r->op) || is_sample(r->op)))
+   r = r->l;
+   if (r && is_project(r->op) && r->exps) {
+   unsigned int max2 = 10, max3 = 10;  /* to help calculate 
widths */
+   nrows += list_length(r->exps);
 
-   t = exp_subtype(e);
-   slen = strlen(t->type->sqlname);
-   if (slen > len1)
-   len1 = slen;
-   while (t->digits >= max2) {
-   len2++;
-   max2 *= 10;
-   }
-   while (t->scale >= max3) {
-   len3++;
-   max3 *= 10;
-   }
-   name = exp_relname(e);
-   if (!name && e->type == e_column && e->l)
-   name = e->l;
-   slen = name ? strlen(name) : 0;
-   if (slen > len5)
-   len5 = slen;
-   name = exp_name(e);
-   if (!name && e->type == e_column && e->r)
-   name = e->r;
-   slen = name ? strlen(name) : 0;
-   if (slen > len6)
-   len6 = slen;
-   }
-   }
-
-   /* calculate column widths */
-   if (q->f->ops) {
-   unsigned int max2 = 10, max3 = 10;  /* to help 
calculate widths */
+   for (n = r->exps->h; n; n = n->next) {
+   const char *name;
+   sql_exp *e = n->data;
+   size_t slen;
 
-   for (n = q->f->ops->h; n; n = n->next) {
-   size_t slen;
-
-   a = n->data;
-   t = >type;
-   slen = strlen(t->type->sqlname);
-   if (slen > len1)
-   len1 = slen;
-   while (t->digits >= max2) {
-   len2++;
-   max2 *= 10;
-   }
-   while (t->scale >= max3) {
-   len3++;
-   max3 *= 10;
-   }
+   t = exp_subtype(e);
+   slen = strlen(t->type->sqlname);
+   if (slen > len1)
+   len1 = slen;
+   while (t->digits >= max2) {
+   len2++;
+   max2 *= 10;
+   }
+   while (t->scale >= max3) {
+   len3++;
+   max3 *= 10;
}
+   name = exp_relname(e);
+   if (!name && e->type == e_column && e->l)
+   name = e->l;
+   slen = name ? strlen(name) : 0;
+   if (slen > len5)
+   len5 = slen;
+   name = exp_name(e);
+   if (!name && e->type == e_column && e->r)
+   name = e->r;
+   slen = name ? strlen(name) : 0;
+   if (slen > len6)
+   len6 = slen;
}

MonetDB: Oct2020 - Implemented division of int and float giving ...

2020-09-15 Thread Sjoerd Mullender
Changeset: 0097ac37d8ae for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0097ac37d8ae
Modified Files:
gdk/gdk_calc.c
Branch: Oct2020
Log Message:

Implemented division of int and float giving int.
Also, make multiplication of int and float giving int work for all outout int
types, not just ones that are at least as large as the input int.


diffs (truncated from 810 to 300 lines):

diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -5600,6 +5600,12 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(const TY
 #define rounddbl(x)round(x)
 #endif
 
+#define absbte(x)  abs(x)
+#define abssht(x)  abs(x)
+#define absint(x)  abs(x)
+#define abslng(x)  llabs(x)
+#define abshge(x)  ABSOLUTE(x)
+
 #define MUL_INT_FLT_INT(TYPE1, TYPE2, TYPE3)   \
 static BUN \
 mul_##TYPE1##_##TYPE2##_##TYPE3(   \
@@ -5622,7 +5628,7 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(  
\
nils++; \
} else if (lft[i] == 0 || rgt[j] == 0) {\
dst[k] = 0; \
-   } else if (max / rgt[j] < lft[i]) { \
+   } else if (max / fabs(rgt[j]) < abs##TYPE1(lft[i])) { \
if (abort_on_error) \
ON_OVERFLOW(TYPE1, TYPE2, "*"); \
dst[k] = TYPE3##_nil;   \
@@ -5643,7 +5649,7 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(  
\
nils++; \
} else if (lft[i] == 0 || rgt[j] == 0) {\
dst[k] = 0; \
-   } else if (max / rgt[j] < lft[i]) { \
+   } else if (max / fabs(rgt[j]) < abs##TYPE1(lft[i])) { \
if (abort_on_error) \
ON_OVERFLOW(TYPE1, TYPE2, "*"); \
dst[k] = TYPE3##_nil;   \
@@ -5661,17 +5667,27 @@ MUL_INT_FLT_INT(bte, flt, bte)
 MUL_INT_FLT_INT(bte, flt, sht)
 MUL_INT_FLT_INT(bte, flt, int)
 MUL_INT_FLT_INT(bte, flt, lng)
+MUL_INT_FLT_INT(sht, flt, bte)
 MUL_INT_FLT_INT(sht, flt, sht)
 MUL_INT_FLT_INT(sht, flt, int)
 MUL_INT_FLT_INT(sht, flt, lng)
+MUL_INT_FLT_INT(int, flt, bte)
+MUL_INT_FLT_INT(int, flt, sht)
 MUL_INT_FLT_INT(int, flt, int)
 MUL_INT_FLT_INT(int, flt, lng)
+MUL_INT_FLT_INT(lng, flt, bte)
+MUL_INT_FLT_INT(lng, flt, sht)
+MUL_INT_FLT_INT(lng, flt, int)
 MUL_INT_FLT_INT(lng, flt, lng)
 #ifdef HAVE_HGE
 MUL_INT_FLT_INT(bte, flt, hge)
 MUL_INT_FLT_INT(sht, flt, hge)
 MUL_INT_FLT_INT(int, flt, hge)
 MUL_INT_FLT_INT(lng, flt, hge)
+MUL_INT_FLT_INT(hge, flt, bte)
+MUL_INT_FLT_INT(hge, flt, sht)
+MUL_INT_FLT_INT(hge, flt, int)
+MUL_INT_FLT_INT(hge, flt, lng)
 MUL_INT_FLT_INT(hge, flt, hge)
 #endif
 
@@ -5679,17 +5695,27 @@ MUL_INT_FLT_INT(bte, dbl, bte)
 MUL_INT_FLT_INT(bte, dbl, sht)
 MUL_INT_FLT_INT(bte, dbl, int)
 MUL_INT_FLT_INT(bte, dbl, lng)
+MUL_INT_FLT_INT(sht, dbl, bte)
 MUL_INT_FLT_INT(sht, dbl, sht)
 MUL_INT_FLT_INT(sht, dbl, int)
 MUL_INT_FLT_INT(sht, dbl, lng)
+MUL_INT_FLT_INT(int, dbl, bte)
+MUL_INT_FLT_INT(int, dbl, sht)
 MUL_INT_FLT_INT(int, dbl, int)
 MUL_INT_FLT_INT(int, dbl, lng)
+MUL_INT_FLT_INT(lng, dbl, bte)
+MUL_INT_FLT_INT(lng, dbl, sht)
+MUL_INT_FLT_INT(lng, dbl, int)
 MUL_INT_FLT_INT(lng, dbl, lng)
 #ifdef HAVE_HGE
 MUL_INT_FLT_INT(bte, dbl, hge)
 MUL_INT_FLT_INT(sht, dbl, hge)
 MUL_INT_FLT_INT(int, dbl, hge)
 MUL_INT_FLT_INT(lng, dbl, hge)
+MUL_INT_FLT_INT(hge, dbl, bte)
+MUL_INT_FLT_INT(hge, dbl, sht)
+MUL_INT_FLT_INT(hge, dbl, int)
+MUL_INT_FLT_INT(hge, dbl, lng)
 MUL_INT_FLT_INT(hge, dbl, hge)
 #endif
 
@@ -6383,6 +6409,13 @@ mul_typeswitchloop(const void *lft, int 
 #endif
case TYPE_flt:
switch (tp) {
+   case TYPE_bte:
+   nils = mul_sht_flt_bte(lft, incr1, rgt, incr2,
+  dst, GDK_bte_max,
+  ci1, ci2,
+  candoff1, candoff2,
+  abort_on_error);
+   break;
case TYPE_sht:
nils = mul_sht_flt_sht(lft, incr1, rgt, incr2,
   dst, GDK_sht_max,
@@ -6431,6 +6464,13 @@ mul_typeswitchloop(const void *lft, int 
break;
case TYPE_dbl:

MonetDB: monetdbe-proxy - Renaming.

2020-09-15 Thread Aris Koning
Changeset: 1d8065498673 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d8065498673
Modified Files:
tools/monetdbe/monetdbe.c
Branch: monetdbe-proxy
Log Message:

Renaming.


diffs (21 lines):

diff --git a/tools/monetdbe/monetdbe.c b/tools/monetdbe/monetdbe.c
--- a/tools/monetdbe/monetdbe.c
+++ b/tools/monetdbe/monetdbe.c
@@ -919,7 +919,7 @@ monetdbe_result_cb(void* context, char* 
 }
 
 static char*
-monetdbe_query_external(monetdbe_database_internal *mdbe, char* query, 
monetdbe_result** result, monetdbe_cnt* affected_rows)
+monetdbe_query_remote(monetdbe_database_internal *mdbe, char* query, 
monetdbe_result** result, monetdbe_cnt* affected_rows)
 {
// TODO: do something with affected_rows
(void) affected_rows;
@@ -997,7 +997,7 @@ monetdbe_query(monetdbe_database dbhdl, 
monetdbe_database_internal *mdbe = (monetdbe_database_internal*)dbhdl;
 
if (mdbe->mid) {
-   mdbe->msg = monetdbe_query_external(mdbe, query, result, 
affected_rows);
+   mdbe->msg = monetdbe_query_remote(mdbe, query, result, 
affected_rows);
}
else {
mdbe->msg = monetdbe_query_internal(mdbe, query, result, 
affected_rows, NULL, 'S');
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: typing - Allow multiplication between intervals and flo...

2020-09-15 Thread Pedro Ferreira
Changeset: 5dba0e911c10 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5dba0e911c10
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
monetdb5/modules/mal/batcalc.c
monetdb5/modules/mal/calc.c
sql/common/sql_types.c
sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql
sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.err
sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out
sql/test/sys-schema/Tests/systemfunctions.stable.out
sql/test/sys-schema/Tests/systemfunctions.stable.out.int128
Branch: typing
Log Message:

Allow multiplication between intervals and floating points


diffs (truncated from 758 to 300 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -1377,6 +1377,8 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:lng], X_2:bat[:sht], 
X_3:bat[:oid], X_4:bat[:oid]):bat[:lng] ", "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:lng], X_2:bte, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:lng], X_2:dbl, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:lng], X_2:dbl, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
+[ "batcalc",   "*","pattern batcalc.*(X_1:bat[:lng], X_2:flt, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:lng], X_2:flt, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:lng], X_2:int, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
 [ "batcalc",   "*","pattern batcalc.*(X_1:bat[:lng], X_2:lng, 
X_3:bat[:oid]):bat[:lng] ",  "CMDbatMULsignal;", ""  ]
@@ -4828,6 +4830,8 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "mul_noerror",  "pattern batcalc.mul_noerror(X_1:bat[:lng], 
X_2:bat[:sht], X_3:bat[:oid], X_4:bat[:oid]):bat[:lng] ",   "CMDbatMUL;",   ""  
]
 [ "batcalc",   "mul_noerror",  "pattern batcalc.mul_noerror(X_1:bat[:lng], 
X_2:bte, X_3:bat[:oid]):bat[:lng] ","CMDbatMUL;",   ""  ]
 [ "batcalc",   "mul_noerror",  "pattern batcalc.mul_noerror(X_1:bat[:lng], 
X_2:dbl, X_3:bat[:oid]):bat[:lng] ","CMDbatMUL;",   ""  ]
+[ "batcalc",   "mul_noerror",  "pattern batcalc.mul_noerror(X_1:bat[:lng], 
X_2:dbl, X_3:bat[:oid]):bat[:lng] ","CMDbatMUL;",   ""  ]
+[ "batcalc",   "mul_noerror",  "pattern batcalc.mul_noerror(X_1:bat[:lng], 
X_2:flt, X_3:bat[:oid]):bat[:lng] ","CMDbatMUL;",   ""  ]
 [ "batcalc",   "mul_noerror",  "pattern batcalc.mul_noerror(X_1:bat[:lng], 
X_2:flt, X_3:bat[:oid]):bat[:lng] ","CMDbatMUL;",   ""  ]
 [ "batcalc",   "mul_noerror",  "pattern batcalc.mul_noerror(X_1:bat[:lng], 
X_2:int, X_3:bat[:oid]):bat[:lng] ","CMDbatMUL;",   ""  ]
 [ "batcalc",   "mul_noerror",  "pattern batcalc.mul_noerror(X_1:bat[:lng], 
X_2:lng, X_3:bat[:oid]):bat[:lng] ","CMDbatMUL;",   ""  ]
@@ -6150,7 +6154,11 @@ stdout of test 'MAL-signatures` in direc
 [ "calc",  "*","pattern calc.*(X_1:bte, X_2:bte):int ",
"CMDvarMULsignal;", ""  ]
 [ "calc",  "*","pattern calc.*(X_1:bte, X_2:bte):lng ",
"CMDvarMULsignal;", ""  ]
 [ "calc",  "*","pattern calc.*(X_1:bte, X_2:bte):sht ",
"CMDvarMULsignal;", ""  ]
+[ "calc",  "*","pattern calc.*(X_1:bte, X_2:dbl):bte ",
"CMDvarMULsignal;", ""  ]
+[ "calc",  "*","pattern calc.*(X_1:bte, X_2:dbl):bte ",
"CMDvarMULsignal;", ""  ]
 [ "calc",  "*","pattern calc.*(X_1:bte, X_2:dbl):dbl ",
"CMDvarMULsignal;", ""  ]
+[ "calc",  "*","pattern calc.*(X_1:bte, X_2:flt):bte ",
"CMDvarMULsignal;", ""  ]
+[ "calc",  "*","pattern calc.*(X_1:bte, X_2:flt):bte ",
"CMDvarMULsignal;", ""  ]
 [ "calc",  "*","pattern calc.*(X_1:bte, X_2:flt):dbl ",
"CMDvarMULsignal;", ""  ]
 [ "calc",  "*","pattern calc.*(X_1:bte, X_2:flt):flt ",
"CMDvarMULsignal;", ""  ]
 [ "calc",  "*","pattern calc.*(X_1:bte, X_2:int):dbl ",
"CMDvarMULsignal;", ""  ]
@@ -7358,7 +7366,9 @@ stdout of test 'MAL-signatures` in direc
 [ "calc",  "month_interval",   "pattern calc.month_interval(X_1:sht, 
X_2:int, X_3:int):int ",  "month_interval;",  ""  ]
 [ "calc",  "month_interval",   "pattern calc.month_interval(X_1:str, 
X_2:int, X_3:int):int ",  "month_interval_str;",  ""  ]
 [ "calc",  "mul_noerror",  

MonetDB: mtest - start convert to sqllogic tests script

2020-09-15 Thread svetlin
Changeset: 506eb528d8ae for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=506eb528d8ae
Added Files:
sql/test/null/sqllogictest/Tests/All
sql/test/null/sqllogictest/Tests/coalesce.stable.err
sql/test/null/sqllogictest/Tests/coalesce.stable.out
sql/test/null/sqllogictest/Tests/coalesce.test
sql/test/null/sqllogictest/Tests/coalesce2.stable.err
sql/test/null/sqllogictest/Tests/coalesce2.stable.out
sql/test/null/sqllogictest/Tests/coalesce2.test
sql/test/null/sqllogictest/Tests/coalesce3.stable.err
sql/test/null/sqllogictest/Tests/coalesce3.stable.out
sql/test/null/sqllogictest/Tests/coalesce3.test
sql/test/null/sqllogictest/Tests/null_in_case.stable.err
sql/test/null/sqllogictest/Tests/null_in_case.stable.out
sql/test/null/sqllogictest/Tests/null_in_case.test
testing/convert_to_sqllogic.sh
Branch: mtest
Log Message:

start convert to sqllogic tests script


diffs (truncated from 333 to 300 lines):

diff --git a/sql/test/null/sqllogictest/Tests/All 
b/sql/test/null/sqllogictest/Tests/All
new file mode 100644
--- /dev/null
+++ b/sql/test/null/sqllogictest/Tests/All
@@ -0,0 +1,4 @@
+null_in_case
+coalesce
+coalesce2
+coalesce3
diff --git a/sql/test/null/sqllogictest/Tests/coalesce.stable.err 
b/sql/test/null/sqllogictest/Tests/coalesce.stable.err
new file mode 100644
diff --git a/sql/test/null/sqllogictest/Tests/coalesce.stable.out 
b/sql/test/null/sqllogictest/Tests/coalesce.stable.out
new file mode 100644
diff --git a/sql/test/null/sqllogictest/Tests/coalesce.test 
b/sql/test/null/sqllogictest/Tests/coalesce.test
new file mode 100644
--- /dev/null
+++ b/sql/test/null/sqllogictest/Tests/coalesce.test
@@ -0,0 +1,63 @@
+statement ok
+CREATE TABLE my_table1 ( col1 VARCHAR(1) ) 
+
+statement ok
+CREATE TABLE my_table2 ( col1 VARCHAR(1) NOT NULL, col2 INT NOT NULL) 
+
+statement ok
+INSERT INTO my_table1 VALUES ('A') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('B') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('B') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('C') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('C') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('C') 
+
+statement ok
+INSERT INTO my_table1 VALUES (NULL) 
+
+statement ok
+INSERT INTO my_table1 VALUES (NULL) 
+
+statement ok
+INSERT INTO my_table1 VALUES (NULL) 
+
+statement ok
+INSERT INTO my_table1 VALUES (NULL) 
+
+statement ok
+INSERT INTO my_table2 VALUES ('A', 1) 
+
+statement ok
+INSERT INTO my_table2 VALUES ('B', 2) 
+
+statement ok
+INSERT INTO my_table2 VALUES ('C', 3) 
+
+query I rowsort
+SELECT CASE WHEN COALESCE(x.col1,'$CS$') = '$CS$' THEN 0
+WHEN COAlesce(X.Col1,'$CS$') = x.col1 THEN (SELECT y.col2
+FROM my_table2 y WHERE y.col1 = x.col1)
+   END AS col1
+FROM (
+  SELECT * FROM my_table1
+ ) x
+
+
+10 values hashing to e0145663d590ae02decc8cdc9071e0c2
+
+statement ok
+DROP   TABLE my_table1 
+
+statement ok
+DROP   TABLE my_table2 
+
diff --git a/sql/test/null/sqllogictest/Tests/coalesce2.stable.err 
b/sql/test/null/sqllogictest/Tests/coalesce2.stable.err
new file mode 100644
diff --git a/sql/test/null/sqllogictest/Tests/coalesce2.stable.out 
b/sql/test/null/sqllogictest/Tests/coalesce2.stable.out
new file mode 100644
diff --git a/sql/test/null/sqllogictest/Tests/coalesce2.test 
b/sql/test/null/sqllogictest/Tests/coalesce2.test
new file mode 100644
--- /dev/null
+++ b/sql/test/null/sqllogictest/Tests/coalesce2.test
@@ -0,0 +1,69 @@
+statement ok
+CREATE TABLE my_table1 ( col1 VARCHAR(1) ) 
+
+statement ok
+CREATE TABLE my_table2 ( col1 VARCHAR(1) NOT NULL, col2 INT NOT NULL) 
+
+statement ok
+INSERT INTO my_table1 VALUES ('A') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('B') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('B') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('C') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('C') 
+
+statement ok
+INSERT INTO my_table1 VALUES ('C') 
+
+statement ok
+INSERT INTO my_table1 VALUES (NULL) 
+
+statement ok
+INSERT INTO my_table1 VALUES (NULL) 
+
+statement ok
+INSERT INTO my_table1 VALUES (NULL) 
+
+statement ok
+INSERT INTO my_table1 VALUES (NULL) 
+
+statement ok
+INSERT INTO my_table2 VALUES ('A', 1) 
+
+statement ok
+INSERT INTO my_table2 VALUES ('B', 2) 
+
+statement ok
+INSERT INTO my_table2 VALUES ('C', 3) 
+
+query I rowsort
+SELECT (SELECT y.col2 FROM my_table2 y WHERE y.col1 = x.col1) AS col1
+FROM (
+  SELECT * FROM my_table1
+ ) x
+
+
+10 values hashing to da0f81f3773ec10b245318fdf05e21ce
+
+query I rowsort
+SELECT COALESCE((SELECT y.col2 FROM my_table2 y WHERE y.col1 = x.col1),0) AS 
col1
+FROM (
+  SELECT * FROM my_table1
+ ) x
+
+
+10 values hashing to e0145663d590ae02decc8cdc9071e0c2
+
+statement ok
+DROP   TABLE my_table1 
+
+statement ok
+DROP   TABLE my_table2 
+
diff --git a/sql/test/null/sqllogictest/Tests/coalesce3.stable.err 

MonetDB: mtest - cmake for sqllogictest

2020-09-15 Thread svetlin
Changeset: 82fa5b093b5f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=82fa5b093b5f
Modified Files:
testing/CMakeLists.txt
testing/mktest.py
Branch: mtest
Log Message:

cmake for sqllogictest


diffs (32 lines):

diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -187,4 +187,19 @@ else()
 COMPONENT pytesting)
 endif()
 
+configure_file(mktest.py
+  ${CMAKE_CURRENT_BINARY_DIR}/mktest.py
+  COPYONLY)
+
+configure_file(sqllogictest.py
+  ${CMAKE_CURRENT_BINARY_DIR}/sqllogictest.py
+  COPYONLY)
+
+install(FILES
+  ${CMAKE_CURRENT_BINARY_DIR}/mktest.py
+  ${CMAKE_CURRENT_BINARY_DIR}/sqllogictest.py
+  PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
+  DESTINATION ${CMAKE_INSTALL_BINDIR}
+  COMPONENT pytesting)
+
 # vim: set ts=2:sw=2:et
diff --git a/testing/mktest.py b/testing/mktest.py
--- a/testing/mktest.py
+++ b/testing/mktest.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0.  If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mtest - merge mdiff

2020-09-15 Thread svetlin
Changeset: 4a2ce2f3a788 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a2ce2f3a788
Branch: mtest
Log Message:

merge mdiff


diffs (truncated from 531 to 300 lines):

diff --git a/testing/Mdiff.c b/testing/Mdiff.c
--- a/testing/Mdiff.c
+++ b/testing/Mdiff.c
@@ -35,6 +35,7 @@ showUsage(char *name)
printf(" this makes diff slower (sometimes much slower)\n");
printf(" -t  : text for caption (optional, default: empty)\n");
printf(" -r   : revision of old file (optional, default: 
empty)\n");
+   printf(" -f: output format html or txt (optional, default: 
html)\n");
printf(" -q: be less verbose\n");
printf("  : first file for diff\n");
printf("  : second file for diff\n");
@@ -51,10 +52,11 @@ main(int argc, char **argv)
char DEFAULT[] = "-I'^#'";
 #endif
char ignoreWHITE[] = " -b -B";
-   char *old_fn, *new_fn, *html_fn, *caption = EMPTY, *revision = EMPTY, 
*ignoreEXP = DEFAULT, *ignore = NULL, *function = EMPTY;
+   char *old_fn, *new_fn, *out_fn, *caption = EMPTY, *revision = EMPTY, 
*ignoreEXP = DEFAULT, *ignore = NULL, *function = EMPTY;
int LWC = 1, context = 1, option, mindiff = 0, quiet = 0;
+bool out_html = true;
 
-   while ((option = getopt(argc, argv, "hdqA:C:I:F:t:r:")) != EOF)
+   while ((option = getopt(argc, argv, "hdqA:C:I:F:t:r:f:")) != EOF)
switch (option) {
case 'd':
mindiff = 1;
@@ -100,6 +102,10 @@ main(int argc, char **argv)
case 'r':
revision = optarg;
break;
+   case 'f':
+if (strcmp("txt", optarg) == 0)
+out_html=false;
+   break;
case 'q':
quiet = 1;
break;
@@ -120,11 +126,17 @@ main(int argc, char **argv)
optind--;
old_fn = ((argc > (++optind)) ? argv[optind] : "-");
new_fn = ((argc > (++optind)) ? argv[optind] : "-");
-   html_fn = ((argc > (++optind)) ? argv[optind] : "-");
+   out_fn = ((argc > (++optind)) ? argv[optind] : "-");
 
-   TRACE(fprintf(STDERR, "%s %s -A %i -C %i %s %s -t %s -r %s  %s %s 
%s\n", argv[0], mindiff ? "-d" : "", LWC, context, ignore, function, caption, 
revision, old_fn, new_fn, html_fn));
-
-   switch (oldnew2html(mindiff, LWC, context, ignore, function, old_fn, 
new_fn, html_fn, caption, revision)) {
+int res;
+if (out_html) {
+TRACE(fprintf(STDERR, "%s %s -A %i -C %i %s %s -t %s -r %s  %s %s 
%s\n", argv[0], mindiff ? "-d" : "", LWC, context, ignore, function, caption, 
revision, old_fn, new_fn, out_fn));
+res = oldnew2html(mindiff, LWC, context, ignore, function, old_fn, 
new_fn, out_fn, caption, revision);
+} else {
+TRACE(fprintf(STDERR, "%s %s -A %i -C %i %s %s %s %s %s\n", argv[0], 
mindiff ? "-d" : "", LWC, context, ignore, function, old_fn, new_fn, out_fn));
+res = oldnew2txt(mindiff, LWC, context, ignore, function, old_fn, 
new_fn, out_fn);
+}
+   switch (res) {
case 0:
if (quiet == 0)
fprintf(STDERR, "%s and %s are equal.\n", old_fn, 
new_fn);
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1424,6 +1424,7 @@ def PerformDir(env, testdir, testlist, B
 '*.client.err', '*.client.out',
 '*.err.diff.html', '*.err.head.html', '*.err.html',
 '*.out.diff.html', '*.out.head.html', '*.out.html',
+'*.out.diff.txt', '*.err.diff.txt',
 '*.server.err', '*.server.out',
 '*.stable.err*', '*.stable.out*',
 '*.test.err', '*.test.out',
@@ -2453,12 +2454,15 @@ def RunTest(env, TST, BusyPorts, COND, o
 cmd.append('-d')
 if not verbose:
 cmd.append('-q')
+diff_format = env.get('diff_format', 'html') 
+out_fn = ('%s.out.diff.html' % TST)
 cmd.extend(['-F^#', '-I%s' % par['IGNORE'],
 '-C%s' % par['CONTEXT'], '-A%d' % ACCURACYout,
 titlefmt % ('err', 'err'),
+'-f{}'.format(diff_format),
 '%s%s.FILTERED' % (TST, STABLEout),
 '%s.test.out.FILTERED' % TST,
-'%s.out.diff.html' % TST])
+ out_fn])
 if procdebug:
 print('RunTest: starting process "%s"\n' % '" "'.join(cmd))
 setpgrp = True
@@ -2522,12 +2526,15 @@ def RunTest(env, TST, BusyPorts, COND, o
 cmd.append('-d')
 if not verbose:
 cmd.append('-q')
+diff_format = env.get('diff_format', 'html') 
+out_fn = ('%s.err.diff.html' % 

MonetDB: Oct2020 - Typo.

2020-09-15 Thread Sjoerd Mullender
Changeset: 3bf2c148abd6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3bf2c148abd6
Modified Files:
gdk/gdk_calc.c
Branch: Oct2020
Log Message:

Typo.


diffs (21 lines):

diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -5622,7 +5622,7 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(  
\
nils++; \
} else if (lft[i] == 0 || rgt[j] == 0) {\
dst[k] = 0; \
-   } else if (max / rgt[i] < lft[j]) { \
+   } else if (max / rgt[j] < lft[i]) { \
if (abort_on_error) \
ON_OVERFLOW(TYPE1, TYPE2, "*"); \
dst[k] = TYPE3##_nil;   \
@@ -5643,7 +5643,7 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(  
\
nils++; \
} else if (lft[i] == 0 || rgt[j] == 0) {\
dst[k] = 0; \
-   } else if (max / rgt[i] < lft[j]) { \
+   } else if (max / rgt[j] < lft[i]) { \
if (abort_on_error) \
ON_OVERFLOW(TYPE1, TYPE2, "*"); \
dst[k] = TYPE3##_nil;   \
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Oct2020 - Merge with Jun2020 branch.

2020-09-15 Thread Sjoerd Mullender
Changeset: 0336545c4361 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0336545c4361
Modified Files:
testing/Mtest.py.in
Branch: Oct2020
Log Message:

Merge with Jun2020 branch.


diffs (12 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3205,7 +3205,7 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
 break
 elif CALL == "sqltest":
 import MonetDBtesting.sqllogictest as sqllogictest
-sql = sqllogictest.SQLLogic(ClntErr)
+sql = sqllogictest.SQLLogic(out=ClntErr)
 try:
 sql.connect(hostname='localhost',
 port=int(env['MAPIPORT']),
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2020 - Fix interfacing to sqllogictest.SQLLogic.

2020-09-15 Thread Sjoerd Mullender
Changeset: cace64e39e17 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cace64e39e17
Modified Files:
testing/Mtest.py.in
Branch: Jun2020
Log Message:

Fix interfacing to sqllogictest.SQLLogic.


diffs (12 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3196,7 +3196,7 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
 break
 elif CALL == "sqltest":
 import MonetDBtesting.sqllogictest as sqllogictest
-sql = sqllogictest.SQLLogic(ClntErr)
+sql = sqllogictest.SQLLogic(out=ClntErr)
 try:
 sql.connect(hostname='localhost',
 port=int(env['MAPIPORT']),
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: typing - Merged with Oct2020

2020-09-15 Thread Pedro Ferreira
Changeset: e3b71b80906e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e3b71b80906e
Modified Files:
sql/server/rel_select.c
sql/server/rel_unnest.c
Branch: typing
Log Message:

Merged with Oct2020


diffs (truncated from 843 to 300 lines):

diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -294,6 +294,7 @@ macro(monetdb_configure_sizes)
   check_type_size(short SIZEOF_SHORT LANGUAGE C)
   check_type_size(int SIZEOF_INT LANGUAGE C)
   check_type_size(long SIZEOF_LONG LANGUAGE C)
+  check_type_size("long int" SIZEOF_LONG_INT LANGUAGE C)
   check_type_size(double SIZEOF_DOUBLE LANGUAGE C)
   check_type_size(wchar_t SIZEOF_WCHAR_T LANGUAGE C)
   check_type_size(socklen_t HAVE_SOCKLEN_T LANGUAGE C)
diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -5592,6 +5592,107 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(const TY
return nils;\
 }
 
+#ifdef TRUNCATE_NUMBERS
+#define roundflt(x)(x)
+#define rounddbl(x)(x)
+#else
+#define roundflt(x)roundf(x)
+#define rounddbl(x)round(x)
+#endif
+
+#define MUL_INT_FLT_INT(TYPE1, TYPE2, TYPE3)   \
+static BUN \
+mul_##TYPE1##_##TYPE2##_##TYPE3(   \
+   const TYPE1 *lft, bool incr1, const TYPE2 *rgt, bool incr2, \
+   TYPE3 *restrict dst, TYPE3 max, \
+   struct canditer *restrict ci1, struct canditer *restrict ci2,   \
+   oid candoff1, oid candoff2, bool abort_on_error)\
+{  \
+   BUN nils = 0;   \
+   BUN i = 0, j = 0;   \
+   \
+   if (ci1->tpe == cand_dense && ci2->tpe == cand_dense) { \
+   for (BUN k = 0; k < ci1->ncand; k++) {  \
+   if (incr1)  \
+   i = canditer_next_dense(ci1) - candoff1; \
+   if (incr2)  \
+   j = canditer_next_dense(ci2) - candoff2; \
+   if (is_##TYPE1##_nil(lft[i]) || 
is_##TYPE2##_nil(rgt[j])) { \
+   dst[k] = TYPE3##_nil;   \
+   nils++; \
+   } else if (lft[i] == 0 || rgt[j] == 0) {\
+   dst[k] = 0; \
+   } else if (max / rgt[i] < lft[j]) { \
+   if (abort_on_error) \
+   ON_OVERFLOW(TYPE1, TYPE2, "*"); \
+   dst[k] = TYPE3##_nil;   \
+   nils++; \
+   } else {\
+   double m = lft[i] * rgt[j]; \
+   dst[k] = (TYPE3) rounddbl(m);   \
+   }   \
+   }   \
+   } else {\
+   for (BUN k = 0; k < ci1->ncand; k++) {  \
+   if (incr1)  \
+   i = canditer_next(ci1) - candoff1;  \
+   if (incr2)  \
+   j = canditer_next(ci2) - candoff2;  \
+   if (is_##TYPE1##_nil(lft[i]) || 
is_##TYPE2##_nil(rgt[j])) { \
+   dst[k] = TYPE3##_nil;   \
+   nils++; \
+   } else if (lft[i] == 0 || rgt[j] == 0) {\
+   dst[k] = 0; \
+   } else if (max / rgt[i] < lft[j]) { \
+   if (abort_on_error) \
+   ON_OVERFLOW(TYPE1, TYPE2, "*"); \
+   dst[k] = TYPE3##_nil;   \
+   nils++; \
+   } else {\
+   double m = lft[i] * rgt[j]; \
+   dst[k] = 

MonetDB: Oct2020 - Implemented multiplication of floating point ...

2020-09-15 Thread Sjoerd Mullender
Changeset: 9f5ec2660b86 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9f5ec2660b86
Modified Files:
gdk/gdk_calc.c
Branch: Oct2020
Log Message:

Implemented multiplication of floating point with integer giving integer.
GDK level only.


diffs (truncated from 433 to 300 lines):

diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -5592,6 +5592,107 @@ mul_##TYPE1##_##TYPE2##_##TYPE3(const TY
return nils;\
 }
 
+#ifdef TRUNCATE_NUMBERS
+#define roundflt(x)(x)
+#define rounddbl(x)(x)
+#else
+#define roundflt(x)roundf(x)
+#define rounddbl(x)round(x)
+#endif
+
+#define MUL_INT_FLT_INT(TYPE1, TYPE2, TYPE3)   \
+static BUN \
+mul_##TYPE1##_##TYPE2##_##TYPE3(   \
+   const TYPE1 *lft, bool incr1, const TYPE2 *rgt, bool incr2, \
+   TYPE3 *restrict dst, TYPE3 max, \
+   struct canditer *restrict ci1, struct canditer *restrict ci2,   \
+   oid candoff1, oid candoff2, bool abort_on_error)\
+{  \
+   BUN nils = 0;   \
+   BUN i = 0, j = 0;   \
+   \
+   if (ci1->tpe == cand_dense && ci2->tpe == cand_dense) { \
+   for (BUN k = 0; k < ci1->ncand; k++) {  \
+   if (incr1)  \
+   i = canditer_next_dense(ci1) - candoff1; \
+   if (incr2)  \
+   j = canditer_next_dense(ci2) - candoff2; \
+   if (is_##TYPE1##_nil(lft[i]) || 
is_##TYPE2##_nil(rgt[j])) { \
+   dst[k] = TYPE3##_nil;   \
+   nils++; \
+   } else if (lft[i] == 0 || rgt[j] == 0) {\
+   dst[k] = 0; \
+   } else if (max / rgt[i] < lft[j]) { \
+   if (abort_on_error) \
+   ON_OVERFLOW(TYPE1, TYPE2, "*"); \
+   dst[k] = TYPE3##_nil;   \
+   nils++; \
+   } else {\
+   double m = lft[i] * rgt[j]; \
+   dst[k] = (TYPE3) rounddbl(m);   \
+   }   \
+   }   \
+   } else {\
+   for (BUN k = 0; k < ci1->ncand; k++) {  \
+   if (incr1)  \
+   i = canditer_next(ci1) - candoff1;  \
+   if (incr2)  \
+   j = canditer_next(ci2) - candoff2;  \
+   if (is_##TYPE1##_nil(lft[i]) || 
is_##TYPE2##_nil(rgt[j])) { \
+   dst[k] = TYPE3##_nil;   \
+   nils++; \
+   } else if (lft[i] == 0 || rgt[j] == 0) {\
+   dst[k] = 0; \
+   } else if (max / rgt[i] < lft[j]) { \
+   if (abort_on_error) \
+   ON_OVERFLOW(TYPE1, TYPE2, "*"); \
+   dst[k] = TYPE3##_nil;   \
+   nils++; \
+   } else {\
+   double m = lft[i] * rgt[j]; \
+   dst[k] = (TYPE3) rounddbl(m);   \
+   }   \
+   }   \
+   }   \
+   return nils;\
+}
+
+MUL_INT_FLT_INT(bte, flt, bte)
+MUL_INT_FLT_INT(bte, flt, sht)
+MUL_INT_FLT_INT(bte, flt, int)
+MUL_INT_FLT_INT(bte, flt, lng)
+MUL_INT_FLT_INT(sht, flt, sht)
+MUL_INT_FLT_INT(sht, flt, int)

MonetDB: Oct2020 - Only push semantics flag if that's the case. ...

2020-09-15 Thread Pedro Ferreira
Changeset: 1121bd0ace40 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1121bd0ace40
Modified Files:
sql/backends/monet5/sql_statement.c
sql/test/miscellaneous/Tests/simple_plans.stable.out
sql/test/miscellaneous/Tests/simple_plans.stable.out.single
Branch: Oct2020
Log Message:

Only push semantics flag if that's the case. Also use GDK macros for thetajoin 
mappings


diffs (77 lines):

diff --git a/sql/backends/monet5/sql_statement.c 
b/sql/backends/monet5/sql_statement.c
--- a/sql/backends/monet5/sql_statement.c
+++ b/sql/backends/monet5/sql_statement.c
@@ -2035,7 +2035,7 @@ stmt_join_cand(backend *be, stmt *op1, s
else
q = pushArgument(mb, q, rcand->nr);
q = pushInt(mb, q, JOIN_NE);
-   q = pushBit(mb, q, FALSE);
+   q = pushBit(mb, q, is_semantics?TRUE:FALSE);
q = pushNil(mb, q, TYPE_lng);
if (q == NULL)
return NULL;
@@ -2057,14 +2057,14 @@ stmt_join_cand(backend *be, stmt *op1, s
else
q = pushArgument(mb, q, rcand->nr);
if (cmptype == cmp_lt)
-   q = pushInt(mb, q, -1);
+   q = pushInt(mb, q, JOIN_LT);
else if (cmptype == cmp_lte)
-   q = pushInt(mb, q, -2);
+   q = pushInt(mb, q, JOIN_LE);
else if (cmptype == cmp_gt)
-   q = pushInt(mb, q, 1);
+   q = pushInt(mb, q, JOIN_GT);
else if (cmptype == cmp_gte)
-   q = pushInt(mb, q, 2);
-   q = pushBit(mb, q, TRUE);
+   q = pushInt(mb, q, JOIN_GE);
+   q = pushBit(mb, q, is_semantics?TRUE:FALSE);
q = pushNil(mb, q, TYPE_lng);
if (q == NULL)
return NULL;
diff --git a/sql/test/miscellaneous/Tests/simple_plans.stable.out 
b/sql/test/miscellaneous/Tests/simple_plans.stable.out
--- a/sql/test/miscellaneous/Tests/simple_plans.stable.out
+++ b/sql/test/miscellaneous/Tests/simple_plans.stable.out
@@ -523,25 +523,25 @@ barrier X_133:bit := language.dataflow()
 C_12:bat[:oid] := sql.tid(X_4:int, "sys":str, "another_t":str);
 X_14:bat[:int] := sql.bind(X_4:int, "sys":str, "another_t":str, 
"col1":str, 0:int);
 X_16:bat[:int] := algebra.projection(C_12:bat[:oid], X_14:bat[:int]);
-X_99:bat[:oid] := algebra.thetajoin(X_95:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, true:bit, nil:lng);
+X_99:bat[:oid] := algebra.thetajoin(X_95:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, false:bit, nil:lng);
 X_107:bat[:int] := algebra.projection(X_99:bat[:oid], X_95:bat[:int]);
 X_115:bat[:bte] := algebra.project(X_107:bat[:int], 1:bte);
 C_81:bat[:oid] := sql.tid(X_4:int, "sys":str, "another_t":str, 1:int, 
4:int);
 X_91:bat[:int] := sql.bind(X_4:int, "sys":str, "another_t":str, 
"col1":str, 0:int, 1:int, 4:int);
 X_96:bat[:int] := algebra.projection(C_81:bat[:oid], X_91:bat[:int]);
-X_101:bat[:oid] := algebra.thetajoin(X_96:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, true:bit, nil:lng);
+X_101:bat[:oid] := algebra.thetajoin(X_96:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, false:bit, nil:lng);
 X_108:bat[:int] := algebra.projection(X_101:bat[:oid], X_96:bat[:int]);
 X_116:bat[:bte] := algebra.project(X_108:bat[:int], 1:bte);
 C_83:bat[:oid] := sql.tid(X_4:int, "sys":str, "another_t":str, 2:int, 
4:int);
 X_92:bat[:int] := sql.bind(X_4:int, "sys":str, "another_t":str, 
"col1":str, 0:int, 2:int, 4:int);
 X_97:bat[:int] := algebra.projection(C_83:bat[:oid], X_92:bat[:int]);
-X_103:bat[:oid] := algebra.thetajoin(X_97:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, true:bit, nil:lng);
+X_103:bat[:oid] := algebra.thetajoin(X_97:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, false:bit, nil:lng);
 X_109:bat[:int] := algebra.projection(X_103:bat[:oid], X_97:bat[:int]);
 X_117:bat[:bte] := algebra.project(X_109:bat[:int], 1:bte);
 C_85:bat[:oid] := sql.tid(X_4:int, "sys":str, "another_t":str, 3:int, 
4:int);
 X_93:bat[:int] := sql.bind(X_4:int, "sys":str, "another_t":str, 
"col1":str, 0:int, 3:int, 4:int);
 X_98:bat[:int] := algebra.projection(C_85:bat[:oid], X_93:bat[:int]);
-X_105:bat[:oid] := algebra.thetajoin(X_98:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, true:bit, nil:lng);
+X_105:bat[:oid] := algebra.thetajoin(X_98:bat[:int], X_16:bat[:int], 
nil:BAT, nil:BAT, 1:int, false:bit, nil:lng);
 X_110:bat[:int] := algebra.projection(X_105:bat[:oid], X_98:bat[:int]);
 X_118:bat[:bte] := algebra.project(X_110:bat[:int], 1:bte);
 X_127:bat[:bte] := mat.packIncrement(X_115:bat[:bte], 4:int);
diff --git a/sql/test/miscellaneous/Tests/simple_plans.stable.out.single 

MonetDB: Oct2020 - Queries similar to bug 6939 ending in MAL und...

2020-09-15 Thread Pedro Ferreira
Changeset: 0618001bca38 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0618001bca38
Modified Files:
sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.sql
Branch: Oct2020
Log Message:

Queries similar to bug 6939 ending in MAL undefined errors


diffs (17 lines):

diff --git a/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.sql 
b/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.sql
--- a/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.sql
+++ b/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.sql
@@ -3,3 +3,13 @@ select wlc.clock();
 select wlc.tick();
 select wlr.clock();
 select wlr.tick();
+
+start transaction;
+CREATE TABLE "t0" ("c0" BIGINT);
+INSERT INTO "t0" VALUES (0),(1),(2);
+select profiler.getlimit() from t0;
+select wlc.clock() from t0;
+select wlc.tick() from t0;
+select wlr.clock() from t0;
+select wlr.tick() from t0;
+rollback;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Oct2020 - Fix for bug 6939, ie push left first column o...

2020-09-15 Thread Pedro Ferreira
Changeset: 2de5428c21ec for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2de5428c21ec
Modified Files:
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.err
sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.out
Branch: Oct2020
Log Message:

Fix for bug 6939, ie push left first column only if the cardinality is not 
atomic, otherwise is not required but the side-effect function will be called 
only once.

Also updated mvc_get_value and mvc_next_value error messages to pair with the 
bulk counterparts (This was uncovered while running tests).


diffs (111 lines):

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
@@ -1007,7 +1007,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l
stmt *rows = NULL, *isel = sel;
int nrcands = 0, push_cands = 0;
 
-   if (f->func->side_effect && left) {
+   if (f->func->side_effect && left && left->nrcols > 0) {
if (!exps || list_empty(exps))
append(l,
stmt_const(be,
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
@@ -763,14 +763,14 @@ mvc_next_value(Client cntxt, MalBlkPtr m
if (!mvc_schema_privs(be->mvc, s))
throw(SQL, "sql.next_value", SQLSTATE(42000) "Access denied for 
%s to schema '%s'", sqlvar_get_string(find_global_var(be->mvc, 
mvc_bind_schema(be->mvc, "sys"), "current_user")), s->base.name);
if (!(seq = find_sql_sequence(s, seqname)))
-   throw(SQL, "sql.next_value", SQLSTATE(HY050) "Failed to fetch 
sequence %s.%s", sname, seqname);
+   throw(SQL, "sql.next_value", SQLSTATE(HY050) "Cannot find the 
sequence %s.%s", sname, seqname);
 
if (seq_next_value(seq, res)) {
be->last_id = *res;
sqlvar_set_number(find_global_var(be->mvc, 
mvc_bind_schema(be->mvc, "sys"), "last_id"), be->last_id);
return MAL_SUCCEED;
}
-   throw(SQL, "sql.next_value", SQLSTATE(42000) "Error in fetching next 
value for sequence %s.%s", sname, seqname);
+   throw(SQL, "sql.next_value", SQLSTATE(HY050) "Cannot generate next 
sequence value %s.%s", sname, seqname);
 }
 
 /* str mvc_get_value(lng *res, str *sname, str *seqname); */
@@ -792,11 +792,11 @@ mvc_get_value(Client cntxt, MalBlkPtr mb
if (!(s = mvc_bind_schema(m, sname)))
throw(SQL, "sql.get_value", SQLSTATE(3F000) "Cannot find the 
schema %s", sname);
if (!(seq = find_sql_sequence(s, seqname)))
-   throw(SQL, "sql.get_value", SQLSTATE(HY050) "Failed to fetch 
sequence %s.%s", sname, seqname);
+   throw(SQL, "sql.get_value", SQLSTATE(HY050) "Cannot find the 
sequence %s.%s", sname, seqname);
 
if (seq_get_value(seq, res))
return MAL_SUCCEED;
-   throw(SQL, "sql.get_value", SQLSTATE(42000) "Error in fetching current 
value for sequence %s.%s", sname, seqname);
+   throw(SQL, "sql.get_value", SQLSTATE(HY050) "Cannot get sequence value 
%s.%s", sname, seqname);
 }
 
 static str
diff --git a/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.err 
b/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.err
--- a/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.err
+++ b/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.err
@@ -5,6 +5,12 @@ stderr of test 'mal-multiplex.Bug-6939` 
 # 16:32:49 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-183724" "--port=30927"
 # 16:32:49 >  
 
+MAPI  = (monetdb) /var/tmp/mtest-157139/.s.monetdb.38085
+QUERY = select wlr.clock();
+ERROR = !Could not access wlr.config file 
+MAPI  = (monetdb) /var/tmp/mtest-157139/.s.monetdb.38085
+QUERY = select wlr.tick();
+ERROR = !Could not access wlr.config file 
 
 # 16:32:49 >  
 # 16:32:49 >  "Done."
diff --git a/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.out 
b/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.out
--- a/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.out
+++ b/sql/test/BugTracker-2020/Tests/mal-multiplex.Bug-6939.stable.out
@@ -6,35 +6,23 @@ stdout of test 'mal-multiplex.Bug-6939` 
 # 16:32:49 >  
 
 #select profiler.getlimit();
-% . # table_name
-% getlimit # name
+% .%2 # table_name
+% %2 # name
 % int # type
 % 1 # length
 [ 0]
 #select wlc.clock();
-% . # table_name
-% clock # name
+% .%2 # table_name
+% %2 # name
 % clob # type
-% 11 # length
-[ "wlc.clock()"]
+% 0 # length
+[ NULL ]
 #select wlc.tick();
-% . # table_name
-% tick # name
+% .%2 # table_name
+% %2 # name
 % bigint # type
-% 4 # length
-[ 1234 ]
-#select wlr.clock();
-% . # table_name
-% clock # name
-% 

MonetDB: Oct2020 - merged

2020-09-15 Thread Niels Nes
Changeset: cf2addc76188 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cf2addc76188
Branch: Oct2020
Log Message:

merged


diffs (42 lines):

diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -294,6 +294,7 @@ macro(monetdb_configure_sizes)
   check_type_size(short SIZEOF_SHORT LANGUAGE C)
   check_type_size(int SIZEOF_INT LANGUAGE C)
   check_type_size(long SIZEOF_LONG LANGUAGE C)
+  check_type_size("long int" SIZEOF_LONG_INT LANGUAGE C)
   check_type_size(double SIZEOF_DOUBLE LANGUAGE C)
   check_type_size(wchar_t SIZEOF_WCHAR_T LANGUAGE C)
   check_type_size(socklen_t HAVE_SOCKLEN_T LANGUAGE C)
diff --git a/monetdb_config.h.in b/monetdb_config.h.in
--- a/monetdb_config.h.in
+++ b/monetdb_config.h.in
@@ -283,6 +283,7 @@
 #cmakedefine SIZEOF_SHORT @SIZEOF_SHORT@
 #cmakedefine SIZEOF_INT @SIZEOF_INT@
 #cmakedefine SIZEOF_LONG @SIZEOF_LONG@
+#cmakedefine SIZEOF_LONG_INT @SIZEOF_LONG_INT@
 #cmakedefine SIZEOF_DOUBLE @SIZEOF_DOUBLE@
 #cmakedefine SIZEOF_WCHAR_T @SIZEOF_WCHAR_T@
 
diff --git a/testing/monetdb_mtest.bat.in b/testing/monetdb_mtest.bat.in
--- a/testing/monetdb_mtest.bat.in
+++ b/testing/monetdb_mtest.bat.in
@@ -7,4 +7,5 @@
 @echo off
 
 set 
PATH=@CMAKE_INSTALL_FULL_LIBDIR@;@CMAKE_INSTALL_FULL_LIBDIR@\monetdb5;@CMAKE_INSTALL_FULL_BINDIR@;%PATH%
+cd "@CMAKE_HOME_DIRECTORY@"
 @CMAKE_INSTALL_FULL_BINDIR@/Mtest.py
diff --git a/testing/monetdb_mtest.sh.in b/testing/monetdb_mtest.sh.in
--- a/testing/monetdb_mtest.sh.in
+++ b/testing/monetdb_mtest.sh.in
@@ -5,6 +5,7 @@
 #
 # Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V.
 
+cd "@CMAKE_HOME_DIRECTORY@"
 PATH=@CMAKE_INSTALL_FULL_BINDIR@:$PATH @CMAKE_INSTALL_FULL_BINDIR@/Mtest.py
 
 exit 0
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Oct2020 - fixed bug in push_up_set, ie include the expr...

2020-09-15 Thread Niels Nes
Changeset: 57dc25a4ef38 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=57dc25a4ef38
Modified Files:
sql/server/rel_unnest.c
Branch: Oct2020
Log Message:

fixed bug in push_up_set, ie include the expressions of the pushed down
join on both sides


diffs (11 lines):

diff --git a/sql/server/rel_unnest.c b/sql/server/rel_unnest.c
--- a/sql/server/rel_unnest.c
+++ b/sql/server/rel_unnest.c
@@ -1336,6 +1336,7 @@ push_up_set(mvc *sql, sql_rel *rel, list
/* D djoin (sl setop sr) -> (D djoin sl) setop (D djoin 
sr) */
rel->r = sl;
n = rel_crossproduct(sql->sa, rel_dup(d), sr, rel->op);
+   n->exps = exps_copy(sql, rel->exps);
set_dependent(n);
s->l = rel;
s->r = n;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Oct2020 - Change into source directory before running t...

2020-09-15 Thread Sjoerd Mullender
Changeset: 2a449a76941b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2a449a76941b
Modified Files:
testing/monetdb_mtest.bat.in
testing/monetdb_mtest.sh.in
Branch: Oct2020
Log Message:

Change into source directory before running tests.


diffs (20 lines):

diff --git a/testing/monetdb_mtest.bat.in b/testing/monetdb_mtest.bat.in
--- a/testing/monetdb_mtest.bat.in
+++ b/testing/monetdb_mtest.bat.in
@@ -7,4 +7,5 @@
 @echo off
 
 set 
PATH=@CMAKE_INSTALL_FULL_LIBDIR@;@CMAKE_INSTALL_FULL_LIBDIR@\monetdb5;@CMAKE_INSTALL_FULL_BINDIR@;%PATH%
+cd "@CMAKE_HOME_DIRECTORY@"
 @CMAKE_INSTALL_FULL_BINDIR@/Mtest.py
diff --git a/testing/monetdb_mtest.sh.in b/testing/monetdb_mtest.sh.in
--- a/testing/monetdb_mtest.sh.in
+++ b/testing/monetdb_mtest.sh.in
@@ -5,6 +5,7 @@
 #
 # Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V.
 
+cd "@CMAKE_HOME_DIRECTORY@"
 PATH=@CMAKE_INSTALL_FULL_BINDIR@:$PATH @CMAKE_INSTALL_FULL_BINDIR@/Mtest.py
 
 exit 0
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mdiff - closing mdiff use mtest instead

2020-09-15 Thread svetlin
Changeset: e6a0d7c9ade3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e6a0d7c9ade3
Branch: mdiff
Log Message:

closing mdiff use mtest instead

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mtest - changing mdiff branch to mtest

2020-09-15 Thread svetlin
Changeset: 3d8b3a1fff9c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3d8b3a1fff9c
Branch: mtest
Log Message:

changing mdiff branch to mtest

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Oct2020 - Merge with Jun2020 branch.

2020-09-15 Thread Sjoerd Mullender
Changeset: 75f88045fee4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=75f88045fee4
Modified Files:
cmake/monetdb-defines.cmake
monetdb_config.h.in
Branch: Oct2020
Log Message:

Merge with Jun2020 branch.


diffs (22 lines):

diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -294,6 +294,7 @@ macro(monetdb_configure_sizes)
   check_type_size(short SIZEOF_SHORT LANGUAGE C)
   check_type_size(int SIZEOF_INT LANGUAGE C)
   check_type_size(long SIZEOF_LONG LANGUAGE C)
+  check_type_size("long int" SIZEOF_LONG_INT LANGUAGE C)
   check_type_size(double SIZEOF_DOUBLE LANGUAGE C)
   check_type_size(wchar_t SIZEOF_WCHAR_T LANGUAGE C)
   check_type_size(socklen_t HAVE_SOCKLEN_T LANGUAGE C)
diff --git a/monetdb_config.h.in b/monetdb_config.h.in
--- a/monetdb_config.h.in
+++ b/monetdb_config.h.in
@@ -283,6 +283,7 @@
 #cmakedefine SIZEOF_SHORT @SIZEOF_SHORT@
 #cmakedefine SIZEOF_INT @SIZEOF_INT@
 #cmakedefine SIZEOF_LONG @SIZEOF_LONG@
+#cmakedefine SIZEOF_LONG_INT @SIZEOF_LONG_INT@
 #cmakedefine SIZEOF_DOUBLE @SIZEOF_DOUBLE@
 #cmakedefine SIZEOF_WCHAR_T @SIZEOF_WCHAR_T@
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2020 - unixodbc on Darwin wants to know how large a ...

2020-09-15 Thread Sjoerd Mullender
Changeset: d2f82c095851 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d2f82c095851
Modified Files:
configure.ag
Branch: Jun2020
Log Message:

unixodbc on Darwin wants to know how large a long int is.


diffs (11 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2132,6 +2132,7 @@ AC_CHECK_SIZEOF([char])
 AC_CHECK_SIZEOF([short])
 AC_CHECK_SIZEOF([int])
 AC_CHECK_SIZEOF([long])
+AC_CHECK_SIZEOF([long int])
 AC_CHECK_SIZEOF([void *])
 AC_CHECK_SIZEOF([size_t])
 AC_CHECK_SIZEOF([double])
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Oct2020 - Look for joins while using set operations und...

2020-09-15 Thread Pedro Ferreira
Changeset: 4aa429bd5eee for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4aa429bd5eee
Modified Files:
sql/server/rel_rel.h
sql/server/rel_select.c
sql/server/rel_updates.c
sql/test/SQLancer/Tests/sqlancer07.sql
sql/test/SQLancer/Tests/sqlancer07.stable.err
sql/test/SQLancer/Tests/sqlancer07.stable.out
Branch: Oct2020
Log Message:

Look for joins while using set operations under subqueries under the where 
clause


diffs (109 lines):

diff --git a/sql/server/rel_rel.h b/sql/server/rel_rel.h
--- a/sql/server/rel_rel.h
+++ b/sql/server/rel_rel.h
@@ -29,8 +29,7 @@
 #define sql_psm  (1 << 13) //ORed
 #define sql_values   (1 << 14) //ORed
 #define psm_call (1 << 15) //ORed
-#define sql_merge(1 << 16) //ORed
-#define sql_or   (1 << 17) //ORed
+#define sql_or   (1 << 16) //ORed
 
 #define is_sql_from(X) ((X & sql_from) == sql_from)
 #define is_sql_where(X)((X & sql_where) == sql_where)
@@ -48,7 +47,6 @@
 #define is_sql_psm(X)  ((X & sql_psm) == sql_psm)
 #define is_sql_values(X)   ((X & sql_values) == sql_values)
 #define is_psm_call(X) ((X & psm_call) == psm_call)
-#define is_sql_merge(X)((X & sql_merge) == sql_merge)
 #define is_sql_or(X)   ((X & sql_or) == sql_or)
 
 #define is_updateble(rel) \
diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -2353,7 +2353,7 @@ rel_logical_value_exp(sql_query *query, 
return NULL;
if (ek.card <= card_set && is_project(sq->op) && 
list_length(sq->exps) > 1)
return sql_error(sql, 02, SQLSTATE(42000) "SELECT: 
subquery must return only one column");
-   if (ek.card < card_set && sq->card >= CARD_MULTI && 
(is_sql_sel(f) | is_sql_having(f) | ( is_sql_where(f) && rel && (!*rel || 
is_basetable((*rel)->op) || is_simple_project((*rel)->op) || is_sql_merge(f)
+   if (ek.card < card_set && sq->card >= CARD_MULTI && 
(is_sql_sel(f) | is_sql_having(f) | ( is_sql_where(f) && rel && (!*rel || 
is_basetable((*rel)->op) || is_simple_project((*rel)->op) || 
is_joinop((*rel)->op)
sq = rel_zero_or_one(sql, sq, ek);
return exp_rel(sql, sq);
}
diff --git a/sql/server/rel_updates.c b/sql/server/rel_updates.c
--- a/sql/server/rel_updates.c
+++ b/sql/server/rel_updates.c
@@ -1291,7 +1291,7 @@ merge_into_table(sql_query *query, dlist
join_rel = rel_dup(join_rel);
} else {
join_rel = rel_crossproduct(sql->sa, 
joined, bt, op_left);
-   if (!(join_rel = rel_logical_exp(query, 
join_rel, search_cond, sql_where | sql_join | sql_merge)))
+   if (!(join_rel = rel_logical_exp(query, 
join_rel, search_cond, sql_where | sql_join)))
return NULL;
set_processed(join_rel);
}
@@ -1328,7 +1328,7 @@ merge_into_table(sql_query *query, dlist
join_rel = rel_dup(join_rel);
} else {
join_rel = rel_crossproduct(sql->sa, 
joined, bt, op_left);
-   if (!(join_rel = rel_logical_exp(query, 
join_rel, search_cond, sql_where | sql_join | sql_merge)))
+   if (!(join_rel = rel_logical_exp(query, 
join_rel, search_cond, sql_where | sql_join)))
return NULL;
set_processed(join_rel);
}
@@ -1369,7 +1369,7 @@ merge_into_table(sql_query *query, dlist
join_rel = rel_dup(join_rel);
} else {
join_rel = rel_crossproduct(sql->sa, joined, 
bt, op_left);
-   if (!(join_rel = rel_logical_exp(query, 
join_rel, search_cond, sql_where | sql_join | sql_merge)))
+   if (!(join_rel = rel_logical_exp(query, 
join_rel, search_cond, sql_where | sql_join)))
return NULL;
set_processed(join_rel);
}
diff --git a/sql/test/SQLancer/Tests/sqlancer07.sql 
b/sql/test/SQLancer/Tests/sqlancer07.sql
--- a/sql/test/SQLancer/Tests/sqlancer07.sql
+++ b/sql/test/SQLancer/Tests/sqlancer07.sql
@@ -109,6 +109,8 @@ INSERT INTO "t2" VALUES 
('4'),('4'),('3eSU8,'),(''),('5E~쟱'),('~'),('1386006226'),('0.19005213960704492'),('''{Mdd뒆VB'''),('\015␱%L%]'),('+'),(''),('㕚o+k');
 
 select t0.c1 from t0 where (5) in (case when t0.c1 = 'a' then 1 end, (select 
3));

MonetDB: Oct2020 - Approved output

2020-09-15 Thread Pedro Ferreira
Changeset: b44f4898aa22 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b44f4898aa22
Modified Files:
monetdb5/optimizer/Tests/inline08.stable.out
sql/benchmarks/tpcds/Tests/54.stable.out
Branch: Oct2020
Log Message:

Approved output


diffs (43 lines):

diff --git a/monetdb5/optimizer/Tests/inline08.stable.out 
b/monetdb5/optimizer/Tests/inline08.stable.out
--- a/monetdb5/optimizer/Tests/inline08.stable.out
+++ b/monetdb5/optimizer/Tests/inline08.stable.out
@@ -31,8 +31,25 @@ stdout of test 'inline08` in directory '
 function user.qry():void;  #[0] (0)  0 
 b:bat[:str] := bat.new(:str);  #[1] (0) CMDBATnew 1 <- 2 
 bat.append(b:bat[:str], "1":str);  #[2] (0) BKCappend_val_wrap 3 
<- 1 4 
-z:bat[:str] := mal.multiplex("user":str, "bar":str, b:bat[:str], 
b:bat[:str]); #[3] (0) MANIFOLDremapMultiplex 5 <- 6 7 1 1 
-end user.qry;  #[4] (0)  
+b:bat[:str] := batstr.replace(b:bat[:str], "A":str, "":str);   #[1] 
(0) STRbatReplacecst 1 <- 1 17 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "E":str, "":str);   #[2] 
(0) STRbatReplacecst 1 <- 1 19 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "I":str, "":str);   #[3] 
(0) STRbatReplacecst 1 <- 1 20 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "O":str, "":str);   #[4] 
(0) STRbatReplacecst 1 <- 1 21 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "U":str, "":str);   #[5] 
(0) STRbatReplacecst 1 <- 1 22 18 
+b:bat[:str] := batstr.replace(b:bat[:str], " ":str, "":str);   #[6] 
(0) STRbatReplacecst 1 <- 1 23 18 
+X_9:bat[:str] := b:bat[:str];  #[7] (0)  12 <- 1 
+b:bat[:str] := batstr.replace(b:bat[:str], "A":str, "":str);   #[1] 
(0) STRbatReplacecst 1 <- 1 17 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "E":str, "":str);   #[2] 
(0) STRbatReplacecst 1 <- 1 19 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "I":str, "":str);   #[3] 
(0) STRbatReplacecst 1 <- 1 20 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "O":str, "":str);   #[4] 
(0) STRbatReplacecst 1 <- 1 21 18 
+b:bat[:str] := batstr.replace(b:bat[:str], "U":str, "":str);   #[5] 
(0) STRbatReplacecst 1 <- 1 22 18 
+b:bat[:str] := batstr.replace(b:bat[:str], " ":str, "":str);   #[6] 
(0) STRbatReplacecst 1 <- 1 23 18 
+X_10:bat[:str] := b:bat[:str]; #[7] (0)  13 <- 1 
+X_11:bat[:str] := batcalc.+(X_9:bat[:str], X_10:bat[:str], nil:BAT, 
nil:BAT);  #[3] (0) CMDbatADD 14 <- 12 13 28 29 
+z:bat[:str] := X_11:bat[:str]; #[4] (0)  5 <- 14 
+end user.qry;  #[19] (0)  
+#inline   actions= 0 time=3 usec 
+#remapactions= 1 time=117 usec 
 
 # 20:02:17 >  
 # 20:02:17 >  Done.
diff --git a/sql/benchmarks/tpcds/Tests/54.stable.out 
b/sql/benchmarks/tpcds/Tests/54.stable.out
--- a/sql/benchmarks/tpcds/Tests/54.stable.out
+++ b/sql/benchmarks/tpcds/Tests/54.stable.out
@@ -39,7 +39,7 @@ stdout of test '54` in directory 'sql/be
 #date_dim,
 #customer
 #   WHERE sold_date_sk = d_date_sk
-% .segments,   .,  . # table_name
+% sys.segments,sys.,   sys. # table_name
 % segment, num_customers,  segment_base # name
 % int, bigint, bigint # type
 % 5,   1,  6 # length
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list