Changeset: acebdb2076ce for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=acebdb2076ce
Modified Files:
        sql/backends/monet5/sql.c
Branch: Jun2020
Log Message:

use new BATproject2(cand, col, ins) too cheaply project the stable column part 
and delta inserts over
one candidates bat.


diffs (35 lines):

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
@@ -2153,26 +2153,17 @@ DELTAproject(bat *result, const bat *sub
                if (BATcount(c) == 0) {
                        res = i;
                        i = c;
+                       tres = BATproject(s, res);
                } else {
-                       if ((res = COLcopy(c, c->ttype, true, TRANSIENT)) == 
NULL) {
-                               BBPunfix(s->batCacheid);
-                               BBPunfix(i->batCacheid);
-                               BBPunfix(c->batCacheid);
-                               throw(MAL, "sql.projectdelta", SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
-                       }
-                       BBPunfix(c->batCacheid);
-                       if (BATappend(res, i, NULL, false) != GDK_SUCCEED) {
-                               BBPunfix(s->batCacheid);
-                               BBPunfix(i->batCacheid);
-                               throw(MAL, "sql.projectdelta", SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
-                       }
+                       tres = BATproject2(s, c, i);
                }
+       } else {
+               tres = BATproject(s, res);
        }
        if (i)
                BBPunfix(i->batCacheid);
-
-       tres = BATproject(s, res);
        BBPunfix(res->batCacheid);
+
        if (tres == NULL) {
                BBPunfix(s->batCacheid);
                throw(MAL, "sql.projectdelta", SQLSTATE(HY013) MAL_MALLOC_FAIL);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to