Changeset: 9669034af5b2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9669034af5b2
Modified Files:
        sql/storage/bat/bat_storage.c
Branch: Jan2022
Log Message:

make sure we return proper type on empty update bats


diffs (21 lines):

diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -926,10 +926,16 @@ static BAT *
 bind_ucol(sql_trans *tr, sql_column *c, int access, size_t cnt)
 {
        sql_delta *d = col_timestamp_delta(tr, c);
+       int type = c->type.type->localtype;
 
        if (!d)
                return NULL;
-       return bind_ubat(tr, d, access, c->type.type->localtype, cnt);
+       if (d->cs.st == ST_DICT) {
+               BAT *b = quick_descriptor(d->cs.bid);
+
+               type = b->ttype;
+       }
+       return bind_ubat(tr, d, access, type, cnt);
 }
 
 static BAT *
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to