Changeset: 243bf58a8094 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=243bf58a8094
Added Files:
        clients/R/Tests/deps-install.timeout
Modified Files:
        clients/R/Tests/dbapply.R
        clients/R/Tests/deps-install.R
        clients/R/Tests/deps-test.R
        clients/R/Tests/deps-test.timeout
        clients/R/Tests/dplyr-flights.R
        clients/R/Tests/dplyr-flights.stable.err
        clients/R/Tests/install.R
        monetdb5/optimizer/opt_candidates.c
        monetdb5/optimizer/opt_macro.c
        monetdb5/optimizer/opt_profiler.c
        monetdb5/optimizer/opt_querylog.c
        sql/common/sql_types.c
        sql/server/rel_updates.c
        sql/storage/store.c
        sql/test/Tests/seq-default.stable.out
        sql/test/seq-default.sql
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.powerpc64.int128
Branch: analytics
Log Message:

Merge with default


diffs (truncated from 361 to 300 lines):

diff --git a/clients/R/Tests/dbapply.R b/clients/R/Tests/dbapply.R
--- a/clients/R/Tests/dbapply.R
+++ b/clients/R/Tests/dbapply.R
@@ -1,3 +1,5 @@
+cat("#~BeginProfilingOutput~#\n", file=stderr())
+
 if (Sys.getenv("TSTTRGDIR") != "") {
        .libPaths(c(.libPaths(), paste0(Sys.getenv("TSTTRGDIR"),"/rlibdir")))
 }
@@ -81,4 +83,6 @@ print(res)
 dbRemoveTable(con,tname)
 stopifnot(identical(FALSE, dbExistsTable(con,tname)))
 
+cat("#~EndProfilingOutput~#\n", file=stderr())
+
 print("SUCCESS")
diff --git a/clients/R/Tests/deps-install.R b/clients/R/Tests/deps-install.R
--- a/clients/R/Tests/deps-install.R
+++ b/clients/R/Tests/deps-install.R
@@ -1,6 +1,6 @@
 # autoinstall DBI and digest, we need those to install MonetDB.R
 options(warn = -1)
-packages_required <- c("digest", "DBI")
+packages_required <- c("digest", "DBI", "devtools")
 
 cat("#~BeginProfilingOutput~#\n", file=stderr())
 cat("#~BeginProfilingOutput~#\n", file=stdout())
diff --git a/clients/R/Tests/deps-install.timeout 
b/clients/R/Tests/deps-install.timeout
new file mode 100644
--- /dev/null
+++ b/clients/R/Tests/deps-install.timeout
@@ -0,0 +1,1 @@
+2
diff --git a/clients/R/Tests/deps-test.R b/clients/R/Tests/deps-test.R
--- a/clients/R/Tests/deps-test.R
+++ b/clients/R/Tests/deps-test.R
@@ -1,4 +1,4 @@
-packages_required <- 
c("assertthat","testthat","survey","nycflights13","RSQLite","dbplyr","dplyr","gdata","callr","devtools","DBItest")
+packages_required <- 
c("assertthat","testthat","survey","nycflights13","RSQLite","dbplyr","dplyr","gdata","callr","DBItest")
 
 install_or_upgrade_packages <- function(lp) {
        np <- lp[!(lp %in% installed.packages()[,"Package"])]
diff --git a/clients/R/Tests/deps-test.timeout 
b/clients/R/Tests/deps-test.timeout
--- a/clients/R/Tests/deps-test.timeout
+++ b/clients/R/Tests/deps-test.timeout
@@ -1,1 +1,1 @@
-5
+20
diff --git a/clients/R/Tests/dplyr-flights.R b/clients/R/Tests/dplyr-flights.R
--- a/clients/R/Tests/dplyr-flights.R
+++ b/clients/R/Tests/dplyr-flights.R
@@ -1,3 +1,5 @@
+cat("#~BeginProfilingOutput~#\n", file=stderr())
+
 ff <- textConnection("asdf", open="w")
 # hide output from connect and attach since it would blow up the test output
 # dangerous since it might hide useful warnings
@@ -118,5 +120,6 @@ so(flights %>%
   ) %>%
   filter(arr > 30 | dep > 30))
 
+cat("#~EndProfilingOutput~#\n", file=stderr())
 
 print("SUCCESS")
diff --git a/clients/R/Tests/dplyr-flights.stable.err 
b/clients/R/Tests/dplyr-flights.stable.err
--- a/clients/R/Tests/dplyr-flights.stable.err
+++ b/clients/R/Tests/dplyr-flights.stable.err
@@ -30,7 +30,6 @@ stderr of test 'dplyr-flights` in direct
 # 11:44:05 >  "R" "--vanilla" "--slave" "--args" "30588"
 # 11:44:05 >  
 
-Identifier(s) "year", "month", "day", "hour", "minute" are reserved SQL 
keywords and need(s) to be quoted in queries.
 
 # 11:44:15 >  
 # 11:44:15 >  "Done."
diff --git a/clients/R/Tests/install.R b/clients/R/Tests/install.R
--- a/clients/R/Tests/install.R
+++ b/clients/R/Tests/install.R
@@ -2,13 +2,7 @@ options(warn = -1)
 cat("#~BeginProfilingOutput~#\n", file=stderr())
 cat("#~BeginProfilingOutput~#\n", file=stdout())
 
-install_submodule_git <- function(x, ...) {
-  install_dir <- tempfile()
-  system(paste("git clone --recursive --depth 1", shQuote(x), 
-shQuote(install_dir)))
-  devtools::install(install_dir, ...)
-}
-install_submodule_git("https://github.com/hannesmuehleisen/MonetDBLite-R";)
+devtools::install_github("hannesmuehleisen/MonetDBLite-R")
 
 cat("#~EndProfilingOutput~#\n", file=stderr())
 cat("#~EndProfilingOutput~#\n", file=stdout())
diff --git a/monetdb5/optimizer/opt_candidates.c 
b/monetdb5/optimizer/opt_candidates.c
--- a/monetdb5/optimizer/opt_candidates.c
+++ b/monetdb5/optimizer/opt_candidates.c
@@ -82,11 +82,11 @@ OPTcandidatesImplementation(Client cntxt
        //chkTypes(cntxt->usermodule, mb, FALSE);
        //chkFlow(mb);
        //chkDeclarations(mb);
-    /* keep all actions taken as a post block comment */
+
+       /* keep all actions taken as a post block comment */
        usec = GDKusec()- usec;
-    snprintf(buf,256,"%-20s actions=1 time=" LLFMT " usec","candidates",usec);
-    newComment(mb,buf);
+       snprintf(buf,256,"%-20s actions= 1 time=" LLFMT " 
usec","candidates",usec);
+       newComment(mb,buf);
        addtoMalBlkHistory(mb);
-
        return MAL_SUCCEED;
 }
diff --git a/monetdb5/optimizer/opt_macro.c b/monetdb5/optimizer/opt_macro.c
--- a/monetdb5/optimizer/opt_macro.c
+++ b/monetdb5/optimizer/opt_macro.c
@@ -510,7 +510,7 @@ str OPTmacro(Client cntxt, MalBlkPtr mb,
        chkDeclarations(mb);
        usec += GDKusec() - clk;
        /* keep all actions taken as a post block comment */
-       snprintf(buf,256,"%-20s actions=1 time=" LLFMT " usec","macro",usec);
+       snprintf(buf,256,"%-20s actions= 1 time=" LLFMT " usec","macro",usec);
        newComment(mb,buf);
        addtoMalBlkHistory(mb);
        if (mb->errors)
@@ -553,7 +553,7 @@ str OPTorcam(Client cntxt, MalBlkPtr mb,
        usec += GDKusec() - clk;
        /* keep all actions taken as a post block comment */
        usec = GDKusec()- usec;
-       snprintf(buf,256,"%-20s actions=1 time=" LLFMT " usec","orcam",usec);
+       snprintf(buf,256,"%-20s actions= 1 time=" LLFMT " usec","orcam",usec);
        newComment(mb,buf);
        addtoMalBlkHistory(mb);
        if (mb->errors)
diff --git a/monetdb5/optimizer/opt_profiler.c 
b/monetdb5/optimizer/opt_profiler.c
--- a/monetdb5/optimizer/opt_profiler.c
+++ b/monetdb5/optimizer/opt_profiler.c
@@ -110,11 +110,11 @@ OPTprofilerImplementation(Client cntxt, 
        //chkTypes(cntxt->usermodule, mb, FALSE);
        //chkFlow(mb);
        //chkDeclarations(mb);
-       //
-    /* keep all actions taken as a post block comment */
+
+       /* keep all actions taken as a post block comment */
        usec = GDKusec()- usec;
-    snprintf(buf,256,"%-20s actions=1 time=" LLFMT " usec","profiler", usec);
-    newComment(mb,buf);
+       snprintf(buf,256,"%-20s actions= 1 time=" LLFMT " usec","profiler", 
usec);
+       newComment(mb,buf);
        addtoMalBlkHistory(mb);
        return MAL_SUCCEED;
 }
diff --git a/monetdb5/optimizer/opt_querylog.c 
b/monetdb5/optimizer/opt_querylog.c
--- a/monetdb5/optimizer/opt_querylog.c
+++ b/monetdb5/optimizer/opt_querylog.c
@@ -195,10 +195,10 @@ OPTquerylogImplementation(Client cntxt, 
         chkFlow(mb);
         chkDeclarations(mb);
     }
-    /* keep all actions taken as a post block comment */
+       /* keep all actions taken as a post block comment */
        usec = GDKusec()- usec;
-    snprintf(buf,256,"%-20s actions=1 time=" LLFMT " usec","querylog", usec);
-    newComment(mb,buf);
+       snprintf(buf,256,"%-20s actions= 1 time=" LLFMT " usec","querylog", 
usec);
+       newComment(mb,buf);
        addtoMalBlkHistory(mb);
        return msg;
 }
diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c
--- a/sql/common/sql_types.c
+++ b/sql/common/sql_types.c
@@ -802,8 +802,6 @@ sql_find_func(sql_allocator *sa, sql_sch
                for (; he && !found; he = he->chain) 
                        if (he->value == prev->func)
                                found = 1;
-               if (found)
-                       he = he->chain;
        }
        for (; he; he = he->chain) {
                sql_func *f = he->value;
@@ -832,8 +830,6 @@ sql_find_func(sql_allocator *sa, sql_sch
                                        for (; he && !found; he = he->chain) 
                                                if (he->value == prev->func)
                                                        found = 1;
-                                       if (found)
-                                               he = he->chain;
                                }
                                for (; he; he = he->chain) {
                                        sql_func *f = he->value;
@@ -853,8 +849,6 @@ sql_find_func(sql_allocator *sa, sql_sch
                                        for (; n && !found; n = n->next) 
                                                if (n->data == prev)
                                                        found = 1;
-                                       if (found)
-                                               n = n->next;
                                }
                                for (; n; n = n->next) {
                                        sql_func *f = n->data;
@@ -937,8 +931,6 @@ sql_bind_member(sql_allocator *sa, sql_s
                for(; n && !found; n = n->next)
                        if (n->data == prev->func)
                                found = 1;
-               if (n)
-                       n = n->next;
        }
        for (; n; n = n->next) {
                sql_func *f = n->data;
@@ -960,8 +952,6 @@ sql_bind_member(sql_allocator *sa, sql_s
                        for(; n && !found; n = n->next)
                                if (n->data == prev->func)
                                        found = 1;
-                       if (n)
-                               n = n->next;
                }
                for (; n; n = n->next) {
                        sql_func *f = n->data;
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
@@ -32,7 +32,7 @@ insert_value(mvc *sql, sql_column *c, sq
                        e = rel_parse_val(sql, sa_message(sql->sa, "select 
cast(%s as %s);", c->def, typestr), sql->emode, NULL);
                        _DELETE(typestr);
                        if (!e || (e = rel_check_type(sql, &c->type, e, 
type_equal)) == NULL)
-                               return NULL;
+                               return sql_error(sql, 02, SQLSTATE(HY005) 
"INSERT INTO: default expression could not be evaluated");
                        return e;
                } else {
                        return sql_error(sql, 02, SQLSTATE(42000) "INSERT INTO: 
column '%s' has no valid default value", c->base.name);
@@ -363,7 +363,7 @@ rel_inserts(mvc *sql, sql_table *t, sql_
                                                        _DELETE(typestr);
                                                        e = rel_parse_val(sql, 
q, sql->emode, NULL);
                                                        if (!e || (e = 
rel_check_type(sql, &c->type, e, type_equal)) == NULL)
-                                                               return NULL;
+                                                               return 
sql_error(sql, 02, SQLSTATE(HY005) "INSERT INTO: default expression could not 
be evaluated");
                                                } else {
                                                        atom *a = 
atom_general(sql->sa, &c->type, NULL);
                                                        e = exp_atom(sql->sa, 
a);
@@ -575,6 +575,8 @@ insert_into(mvc *sql, dlist *qname, dlis
                return sql_error(sql, 02, SQLSTATE(21S01) "INSERT INTO: query 
result doesn't match number of columns in table '%s'", tname);
 
        r->exps = rel_inserts(sql, t, r, collist, rowcount, 0);
+       if(!r->exps)
+               return NULL;
        return rel_insert_table(sql, t, tname, r);
 }
 
@@ -1557,8 +1559,11 @@ copyfrom(mvc *sql, dlist *qname, dlist *
                return rel;
        if (reorder) 
                rel = rel_project(sql->sa, rel, rel_inserts(sql, t, rel, 
collist, 1, 1));
-       else
+       else {
                rel->exps = rel_inserts(sql, t, rel, collist, 1, 0);
+               if(!rel->exps)
+                       return NULL;
+       }
        rel = rel_insert_table(sql, t, tname, rel);
        if (rel && locked)
                rel->flag |= UPD_LOCKED;
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -4268,7 +4268,7 @@ sys_drop_column(sql_trans *tr, sql_colum
                n = cs_find_name(&syss->seqs, seq_name);
                seq = find_sql_sequence(syss, seq_name);
                if (seq && sql_trans_get_dependency_type(tr, seq->base.id, 
BEDROPPED_DEPENDENCY)) {
-                       sys_drop_sequence(tr, seq, drop_action);                
+                       sys_drop_sequence(tr, seq, drop_action);
                        seq->base.wtime = syss->base.wtime = tr->wtime = 
tr->wstime;
                        cs_del(&syss->seqs, n, seq->base.flag);
                }
diff --git a/sql/test/Tests/seq-default.stable.out 
b/sql/test/Tests/seq-default.stable.out
--- a/sql/test/Tests/seq-default.stable.out
+++ b/sql/test/Tests/seq-default.stable.out
@@ -36,8 +36,6 @@ Ready.
 [ 2005-09-23 12:34:26.736000,  4       ]
 [ 2005-09-23 12:34:26.736000,  5       ]
 [ 2005-09-23 12:34:26.736000,  6       ]
-TABLE     sys.seqdeftest
-SEQUENCE  sys.test_seq
 #drop table seqdeftest;
 #drop sequence test_seq;
 #create table seqdeftest (
@@ -68,10 +66,6 @@ SEQUENCE  sys.test_seq
 [ 2005-10-01,  4,      4,      106     ]
 [ 2005-10-01,  5,      5,      108     ]
 [ 2005-10-01,  6,      6,      110     ]
-SEQUENCE  sys.seq_8499
-SEQUENCE  sys.seq_8501
-SEQUENCE  sys.seq_8503
-TABLE     sys.seqdeftest
 #drop table seqdeftest;
 #CREATE SEQUENCE seq_5700 AS INTEGER;
 #CREATE TABLE kvk (
@@ -108,9 +102,6 @@ TABLE     sys.seqdeftest
 % 1,   1,      5 # length
 [ 3,   3,      "dries" ]
 [ 4,   4,      "viers" ]
-TABLE     sys.kvk
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to