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

If SQLexist or SQLnot_exist are called with a BAT as input ie projection, the 
hseqbase must be set. (This fixes the failing query)


diffs (21 lines):

diff --git a/sql/backends/monet5/sql_subquery.c 
b/sql/backends/monet5/sql_subquery.c
--- a/sql/backends/monet5/sql_subquery.c
+++ b/sql/backends/monet5/sql_subquery.c
@@ -1522,7 +1522,7 @@ SQLexist(Client cntxt, MalBlkPtr mb, Mal
        }
        if (isaBatType(getArgType(mb, pci, 0))) {
                bat *res = getArgReference_bat(stk, pci, 0);
-               if ((r = BATconstant(0, TYPE_bit, &count, b ? BATcount(b) : 1, 
TRANSIENT)) == NULL) {
+               if ((r = BATconstant(b ? b->hseqbase : 0, TYPE_bit, &count, b ? 
BATcount(b) : 1, TRANSIENT)) == NULL) {
                        if (b)
                                BBPunfix(b->batCacheid);
                        throw(SQL, "aggr.exist", SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
@@ -1654,7 +1654,7 @@ SQLnot_exist(Client cntxt, MalBlkPtr mb,
        }
        if (isaBatType(getArgType(mb, pci, 0))) {
                bat *res = getArgReference_bat(stk, pci, 0);
-               if ((r = BATconstant(0, TYPE_bit, &count, b ? BATcount(b) : 1, 
TRANSIENT)) == NULL) {
+               if ((r = BATconstant(b ? b->hseqbase : 0, TYPE_bit, &count, b ? 
BATcount(b) : 1, TRANSIENT)) == NULL) {
                        if (b)
                                BBPunfix(b->batCacheid);
                        throw(SQL, "aggr.not_exist", SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to