Changeset: ab0391fe89ad for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ab0391fe89ad
Modified Files:
        monetdb5/modules/mal/wlc.c
Branch: Mar2018
Log Message:

Don't do unnecessary work.


diffs (32 lines):

diff --git a/monetdb5/modules/mal/wlc.c b/monetdb5/modules/mal/wlc.c
--- a/monetdb5/modules/mal/wlc.c
+++ b/monetdb5/modules/mal/wlc.c
@@ -601,16 +601,14 @@ WLCgeneric(Client cntxt, MalBlkPtr mb, M
 static str
 WLCdatashipping(Client cntxt, MalBlkPtr mb, InstrPtr pci, int bid)
 {      BAT *b;
-       str sch = NULL, tbl = NULL, col = NULL;
+       str sch, tbl, col;
        str msg = MAL_SUCCEED;
        (void) mb;
 
        b = BATdescriptor(bid);
        if (b == NULL) {
-               msg = createException(MAL, "wlc.datashipping", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
-               goto finish;
+               throw(MAL, "wlc.datashipping", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
        }
-       assert(b);
 
 // large BATs can also be re-created using the query.
 // Copy into should always be expanded, because the source may not
@@ -657,8 +655,7 @@ WLCdatashipping(Client cntxt, MalBlkPtr 
                cntxt->wlc_kind = WLC_CATALOG;
        }
 finish:
-       if (b != NULL)
-               BBPunfix(b->batCacheid);
+       BBPunfix(b->batCacheid);
        if (sch)
                GDKfree(sch);
        if (tbl)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to