Changeset: e6522ea41d0d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e6522ea41d0d
Modified Files:
        gdk/gdk_batop.c
        monetdb5/modules/atoms/mtime.c
        monetdb5/modules/kernel/batmmath.c
        monetdb5/modules/kernel/batstr.c
        monetdb5/modules/mal/mkey.c
        monetdb5/modules/mal/pcre.c
        monetdb5/modules/mal/zorder.c
        sql/backends/monet5/sql_cast_impl_down_from_int.h
        sql/backends/monet5/sql_cast_impl_up_to_flt.h
        sql/backends/monet5/sql_cast_impl_up_to_int.h
Branch: default
Log Message:

Mark replacement of head column as legacy.


diffs (truncated from 380 to 300 lines):

diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1498,7 +1498,8 @@ BATconst(BAT *b, int tailtype, const voi
        bn = BATconstant(tailtype, v, BATcount(b), role);
        if (bn == NULL)
                return NULL;
-       if (b->H->type != bn->H->type) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *bnn = VIEWcreate(b, bn);
 
                BBPunfix(bn->batCacheid);
diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c
--- a/monetdb5/modules/atoms/mtime.c
+++ b/monetdb5/modules/atoms/mtime.c
@@ -1584,7 +1584,8 @@ MTIMEtimestamp_create_from_date_bulk(bat
        bn->tsorted = b->tsorted || BATcount(bn) <= 1;
        bn->trevsorted = b->trevsorted || BATcount(bn) <= 1;
        bn->T->nonil = !bn->T->nil;
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *b2 = VIEWcreate(b, bn);
                BBPunfix(bn->batCacheid);
                bn = b2;
@@ -1817,7 +1818,8 @@ MTIMEtimestamp_extract_daytime_default_b
        bn->tsorted = b->tsorted || BATcount(bn) <= 1;
        bn->trevsorted = b->trevsorted || BATcount(bn) <= 1;
        bn->T->nonil = !bn->T->nil;
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *b2 = VIEWcreate(b, bn);
                BBPunfix(bn->batCacheid);
                bn = b2;
@@ -1899,7 +1901,8 @@ MTIMEtimestamp_extract_date_default_bulk
        bn->tsorted = b->tsorted || BATcount(bn) <= 1;
        bn->trevsorted = b->trevsorted || BATcount(bn) <= 1;
        bn->T->nonil = !bn->T->nil;
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *b2 = VIEWcreate(b, bn);
                BBPunfix(bn->batCacheid);
                bn = b2;
@@ -2586,7 +2589,8 @@ MTIMEsecs2daytime_bulk(bat *ret, bat *bi
        bn->tsorted = b->tsorted || BATcount(bn) <= 1;
        bn->trevsorted = b->trevsorted || BATcount(bn) <= 1;
        bn->T->nonil = !bn->T->nil;
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *b2 = VIEWcreate(b, bn);
                BBPunfix(bn->batCacheid);
                bn = b2;
@@ -2725,7 +2729,8 @@ MTIMEtimestamp_bulk(bat *ret, bat *bid)
        bn->tsorted = b->tsorted || BATcount(bn) <= 1;
        bn->trevsorted = b->trevsorted || BATcount(bn) <= 1;
        bn->T->nonil = !bn->T->nil;
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *b2 = VIEWcreate(b, bn);
                BBPunfix(bn->batCacheid);
                bn = b2;
@@ -2789,7 +2794,8 @@ MTIMEtimestamp_lng_bulk(bat *ret, bat *b
        bn->tsorted = b->tsorted || BATcount(bn) <= 1;
        bn->trevsorted = b->trevsorted || BATcount(bn) <= 1;
        bn->T->nonil = !bn->T->nil;
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *b2 = VIEWcreate(b, bn);
                BBPunfix(bn->batCacheid);
                bn = b2;
@@ -3079,7 +3085,8 @@ MTIMEdate_extract_year_bulk(bat *ret, co
                t++;
        }
 
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *r = VIEWcreate(b,bn);
                BBPunfix(bn->batCacheid);
                bn = r;
@@ -3135,7 +3142,8 @@ MTIMEdate_extract_month_bulk(bat *ret, c
                m++;
                t++;
        }
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *r = VIEWcreate(b,bn);
                BBPunfix(bn->batCacheid);
                bn = r;
@@ -3192,7 +3200,8 @@ MTIMEdate_extract_day_bulk(bat *ret, con
                t++;
        }
 
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *r = VIEWcreate(b,bn);
                BBPunfix(bn->batCacheid);
                bn = r;
@@ -3248,7 +3257,8 @@ MTIMEdaytime_extract_hours_bulk(bat *ret
                h++;
                t++;
        }
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *r = VIEWcreate(b,bn);
                BBPunfix(bn->batCacheid);
                bn = r;
@@ -3302,7 +3312,8 @@ MTIMEdaytime_extract_minutes_bulk(bat *r
                m++;
                t++;
        }
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *r = VIEWcreate(b,bn);
                BBPunfix(bn->batCacheid);
                bn = r;
@@ -3355,7 +3366,8 @@ MTIMEdaytime_extract_seconds_bulk(bat *r
                }
                s++; t++;
        }
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *r = VIEWcreate(b,bn);
                BBPunfix(bn->batCacheid);
                bn = r;
@@ -3409,7 +3421,8 @@ MTIMEdaytime_extract_sql_seconds_bulk(ba
                t++;
        }
 
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *r = VIEWcreate(b,bn);
                BBPunfix(bn->batCacheid);
                bn = r;
@@ -3462,7 +3475,8 @@ MTIMEdaytime_extract_milliseconds_bulk(b
                s++;
                t++;
        }
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *r = VIEWcreate(b,bn);
                BBPunfix(bn->batCacheid);
                bn = r;
diff --git a/monetdb5/modules/kernel/batmmath.c 
b/monetdb5/modules/kernel/batmmath.c
--- a/monetdb5/modules/kernel/batmmath.c
+++ b/monetdb5/modules/kernel/batmmath.c
@@ -80,7 +80,8 @@ str CMDscience_bat_##TYPE##_##FUNC(bat *
        BATkey(BATmirror(bn), 0);                                               
                                \
        if (!(bn->batDirty&2))                                                  
                                \
                BATsetaccess(bn, BAT_READ);                                     
                                \
-       if (b->htype != bn->htype) {                                            
                        \
+       if (!BAThdense(b)) {                                                    
                                \
+               /* legacy */                                                    
                                        \
                BAT *r = VIEWcreate(b,bn);                                      
                                \
                                                                                
                                                        \
                BBPunfix(bn->batCacheid);                                       
                                \
@@ -131,7 +132,8 @@ str CMDscience_bat_cst_##FUNC##_##TYPE(b
        BATkey(BATmirror(bn),0);                                                
                                        \
        if (!(bn->batDirty&2))                                                  
                                        \
                BATsetaccess(bn, BAT_READ);                                     
                                        \
-       if (b->htype != bn->htype) {                                            
                                \
+       if (!BAThdense(b)) {                                                    
                                        \
+               /* legacy */                                                    
                                                \
                BAT *r = VIEWcreate(b,bn);                                      
                                        \
                                                                                
                                                                \
                BBPunfix(bn->batCacheid);                                       
                                        \
diff --git a/monetdb5/modules/kernel/batstr.c b/monetdb5/modules/kernel/batstr.c
--- a/monetdb5/modules/kernel/batstr.c
+++ b/monetdb5/modules/kernel/batstr.c
@@ -1242,7 +1242,8 @@ STRbatsubstringcst(bat *ret, const bat *
                GDKfree(res);
        }
 
-       if (b->htype != bn->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *r = VIEWcreate(b,bn);
 
                BBPunfix(bn->batCacheid);
diff --git a/monetdb5/modules/mal/mkey.c b/monetdb5/modules/mal/mkey.c
--- a/monetdb5/modules/mal/mkey.c
+++ b/monetdb5/modules/mal/mkey.c
@@ -189,7 +189,8 @@ MKEYbathash(bat *res, const bat *bid)
        dst->T->nonil = 0;
        dst->T->nil = 0;
 
-       if (dst->htype != b->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *x = VIEWcreate(b, dst);
                BBPunfix(dst->batCacheid);
                dst = x;
@@ -367,7 +368,8 @@ MKEYbulk_rotate_xor_hash(bat *res, const
        bn->T->nonil = 1;
        bn->T->nil = 0;
 
-       if (bn->htype != b->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *x = VIEWcreate(b, bn);
                BBPunfix(bn->batCacheid);
                bn = x;
@@ -455,7 +457,8 @@ MKEYbulkconst_rotate_xor_hash(Client cnt
        bn->T->nonil = 1;
        bn->T->nil = 0;
 
-       if (bn->htype != hb->htype) {
+       if (!BAThdense(hb)) {
+               /* legacy */
                BAT *x = VIEWcreate(hb, bn);
                BBPunfix(bn->batCacheid);
                bn = x;
@@ -567,7 +570,8 @@ MKEYconstbulk_rotate_xor_hash(bat *res, 
        bn->T->nonil = 1;
        bn->T->nil = 0;
 
-       if (bn->htype != b->htype) {
+       if (!BAThdense(b)) {
+               /* legacy */
                BAT *x = VIEWcreate(b, bn);
                BBPunfix(bn->batCacheid);
                bn = x;
diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c
--- a/monetdb5/modules/mal/pcre.c
+++ b/monetdb5/modules/mal/pcre.c
@@ -1198,7 +1198,8 @@ BATPCRElike3(bat *ret, const bat *bid, c
 
                if (!(r->batDirty&2)) BATsetaccess(r, BAT_READ);
 
-               if (strs->htype != r->htype) {
+               if (!BAThdense(strs)) {
+                       /* legacy */
                        BAT *v = VIEWcreate(strs, r);
 
                        BBPunfix(r->batCacheid);
diff --git a/monetdb5/modules/mal/zorder.c b/monetdb5/modules/mal/zorder.c
--- a/monetdb5/modules/mal/zorder.c
+++ b/monetdb5/modules/mal/zorder.c
@@ -182,11 +182,12 @@ ZORDbatencode_int_oid(bat *zbid, bat *xb
        bz->H->nonil = 1;
        bz->T->nonil = bx->T->nonil && by->T->nonil;
 
-       if (bx->htype != bz->htype) {
-        BAT *r = VIEWcreate(bx,bz);
-        BBPunfix(bz->batCacheid);
-        bz = r;
-    }
+       if (!BAThdense(bx)) {
+               /* legacy */
+               BAT *r = VIEWcreate(bx,bz);
+               BBPunfix(bz->batCacheid);
+               bz = r;
+       }
 
        BBPkeepref(*zbid = bz->batCacheid);
        return MAL_SUCCEED;
@@ -240,11 +241,12 @@ ZORDbatdecode_int_oid(bat *xbid, bat *yb
        bx->H->nonil = 1;
        bx->T->nonil = bz->T->nonil;
 
-       if (bx->htype != bz->htype) {
-        BAT *r = VIEWcreate(bz,bx);
-        BBPunfix(bx->batCacheid);
-        bx = r;
-    }
+       if (!BAThdense(bz)) {
+               /* legacy */
+               BAT *r = VIEWcreate(bz,bx);
+               BBPunfix(bx->batCacheid);
+               bx = r;
+       }
 
        if (!(by->batDirty&2)) 
                BATsetaccess(by, BAT_READ);
@@ -257,11 +259,12 @@ ZORDbatdecode_int_oid(bat *xbid, bat *yb
        by->H->nonil = 1;
        by->T->nonil = bz->T->nonil;
 
-       if (by->htype != bz->htype) {
-        BAT *r = VIEWcreate(bz,by);
-        BBPunfix(by->batCacheid);
-        by = r;
-    }
+       if (!BAThdense(bz)) {
+               /* legacy */
+               BAT *r = VIEWcreate(bz,by);
+               BBPunfix(by->batCacheid);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to