Changeset: b20715a41d46 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b20715a41d46
Modified Files:
        sql/backends/monet5/sql.c
Branch: Jul2021
Log Message:

Here the quick descriptor can be used


diffs (29 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
@@ -3141,19 +3141,13 @@ PBATSQLidentity(Client cntxt, MalBlkPtr 
 
        (void) cntxt;
        (void) mb;
-       if ((b = BATdescriptor(bid)) == NULL) {
+       if (!(b = BBPquickdesc(bid, false)))
                throw(MAL, "batcalc.identity", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
-       }
-       bn = BATdense(b->hseqbase, s, BATcount(b));
-       if (bn != NULL) {
-               *ns = s + BATcount(b);
-               BBPunfix(b->batCacheid);
-               BBPkeepref(*res = bn->batCacheid);
-               return MAL_SUCCEED;
-       }
-       BBPunfix(b->batCacheid);
-       throw(MAL, "batcalc.identity", SQLSTATE(45001) "Internal error");
-
+       if (!(bn = BATdense(b->hseqbase, s, BATcount(b))))
+               throw(MAL, "batcalc.identity", GDK_EXCEPTION);
+       *ns = s + BATcount(b);
+       BBPkeepref(*res = bn->batCacheid);
+       return MAL_SUCCEED;
 }
 
 /*
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to