Changeset: 1893a8954c68 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1893a8954c68
Modified Files:
        monetdb5/modules/atoms/mtime.c
Branch: Feb2013
Log Message:

Layout; don't call BATsettrivprop: it's called in BBPkeepref.


diffs (137 lines):

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
@@ -2782,13 +2782,11 @@ MTIMEdate_extract_year_bulk(int *ret, in
        }
 
        if (b->htype != bn->htype) {
-                       BAT *r = VIEWcreate(b,bn);
-                       BBPreleaseref(bn->batCacheid);
-                       bn = r;
+               BAT *r = VIEWcreate(b,bn);
+               BBPreleaseref(bn->batCacheid);
+               bn = r;
        }
-
        BATsetcount(bn, (BUN) (y - (int *) Tloc(bn, BUNfirst(bn))));
-    BATsettrivprop(bn);
 
        bn->H->nonil = b->H->nonil;
        bn->H->nil = b->H->nil;
@@ -2840,12 +2838,11 @@ MTIMEdate_extract_month_bulk(int *ret, i
                t++;
        }
        if (b->htype != bn->htype) {
-                       BAT *r = VIEWcreate(b,bn);
-                       BBPreleaseref(bn->batCacheid);
-                       bn = r;
+               BAT *r = VIEWcreate(b,bn);
+               BBPreleaseref(bn->batCacheid);
+               bn = r;
        }
        BATsetcount(bn, (BUN) (m - (int *) Tloc(bn, BUNfirst(bn))));
-    BATsettrivprop(bn);
 
        bn->H->nonil = b->H->nonil;
        bn->H->nil = b->H->nil;
@@ -2898,12 +2895,11 @@ MTIMEdate_extract_day_bulk(int *ret, int
        }
 
        if (b->htype != bn->htype) {
-                       BAT *r = VIEWcreate(b,bn);
-                       BBPreleaseref(bn->batCacheid);
-                       bn = r;
+               BAT *r = VIEWcreate(b,bn);
+               BBPreleaseref(bn->batCacheid);
+               bn = r;
        }
        BATsetcount(bn, (BUN) (d - (int *) Tloc(bn, BUNfirst(bn))));
-    BATsettrivprop(bn);
 
        bn->H->nonil = b->H->nonil;
        bn->H->nil = b->H->nil;
@@ -2955,12 +2951,11 @@ MTIMEdaytime_extract_hours_bulk(int *ret
                t++;
        }
        if (b->htype != bn->htype) {
-                       BAT *r = VIEWcreate(b,bn);
-                       BBPreleaseref(bn->batCacheid);
-                       bn = r;
+               BAT *r = VIEWcreate(b,bn);
+               BBPreleaseref(bn->batCacheid);
+               bn = r;
        }
        BATsetcount(bn, (BUN) (h - (int *) Tloc(bn, BUNfirst(bn))));
-    BATsettrivprop(bn);
 
        bn->H->nonil = b->H->nonil;
        bn->H->nil = b->H->nil;
@@ -3010,12 +3005,11 @@ MTIMEdaytime_extract_minutes_bulk(int *r
                t++;
        }
        if (b->htype != bn->htype) {
-                       BAT *r = VIEWcreate(b,bn);
-                       BBPreleaseref(bn->batCacheid);
-                       bn = r;
+               BAT *r = VIEWcreate(b,bn);
+               BBPreleaseref(bn->batCacheid);
+               bn = r;
        }
        BATsetcount(bn, (BUN) (m - (int *) Tloc(bn, BUNfirst(bn))));
-    BATsettrivprop(bn);
 
        bn->H->nonil = b->H->nonil;
        bn->H->nil = b->H->nil;
@@ -3064,12 +3058,11 @@ MTIMEdaytime_extract_seconds_bulk(int *r
                s++; t++;
        }
        if (b->htype != bn->htype) {
-                       BAT *r = VIEWcreate(b,bn);
-                       BBPreleaseref(bn->batCacheid);
-                       bn = r;
+               BAT *r = VIEWcreate(b,bn);
+               BBPreleaseref(bn->batCacheid);
+               bn = r;
        }
        BATsetcount(bn, (BUN) (s - (int *) Tloc(bn, BUNfirst(bn))));
-    BATsettrivprop(bn);
 
        bn->H->nonil = b->H->nonil;
        bn->H->nil = b->H->nil;
@@ -3117,14 +3110,13 @@ MTIMEdaytime_extract_sql_seconds_bulk(in
                s++;
                t++;
        }
+
+       if (b->htype != bn->htype) {
+               BAT *r = VIEWcreate(b,bn);
+               BBPreleaseref(bn->batCacheid);
+               bn = r;
+       }
        BATsetcount(bn, (BUN) (s - (int *) Tloc(bn, BUNfirst(bn))));
-    BATsettrivprop(bn);
-
-       if (b->htype != bn->htype) {
-                       BAT *r = VIEWcreate(b,bn);
-                       BBPreleaseref(bn->batCacheid);
-                       bn = r;
-       }
 
        bn->H->nonil = b->H->nonil;
        bn->H->nil = b->H->nil;
@@ -3173,12 +3165,11 @@ MTIMEdaytime_extract_milliseconds_bulk(i
                t++;
        }
        if (b->htype != bn->htype) {
-                       BAT *r = VIEWcreate(b,bn);
-                       BBPreleaseref(bn->batCacheid);
-                       bn = r;
+               BAT *r = VIEWcreate(b,bn);
+               BBPreleaseref(bn->batCacheid);
+               bn = r;
        }
        BATsetcount(bn, (BUN) (s - (int *) Tloc(bn, BUNfirst(bn))));
-    BATsettrivprop(bn);
 
        bn->H->nonil = b->H->nonil;
        bn->H->nil = b->H->nil;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to