Changeset: d0876edb6f8c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d0876edb6f8c
Modified Files:
clients/Tests/exports.stable.out
geom/monetdb5/geom.c
geom/monetdb5/geomBulk.c
monetdb5/modules/mal/mat.c
monetdb5/modules/mal/tablet.c
sql/backends/monet5/generator/generator.c
sql/backends/monet5/sql.c
Branch: default
Log Message:
When not deriving properties, we have to set them to 0.
Also, no setting of properties after COLnew + BUNappend. The latter
takes care of properties.
diffs (221 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -108,7 +108,6 @@ BAT *BATconvert(BAT *b, BAT *s, int tp,
BUN BATcount_no_nil(BAT *b);
gdk_return BATdel(BAT *b, BAT *d);
BAT *BATdense(oid hseq, oid tseq, BUN cnt) __attribute__((warn_unused_result));
-void BATderiveProps(BAT *b, int expensive);
BAT *BATdiff(BAT *l, BAT *r, BAT *sl, BAT *sr, int nil_matches, BUN estimate);
gdk_return BATextend(BAT *b, BUN newcap);
void BATfakeCommit(BAT *b);
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -5633,6 +5633,8 @@ pnpoly(int *out, int nvert, dbl *vx, dbl
*cs++ = wn & 1;
}
+ bo->tsorted = bo->trevsorted = 0;
+ bo->tkey = 0;
BATsetcount(bo, cnt);
BBPunfix(bpx->batCacheid);
BBPunfix(bpy->batCacheid);
@@ -5719,6 +5721,8 @@ pnpolyWithHoles(bat *out, int nvert, dbl
}
*cs++ = wn & 1;
}
+ bo->tsorted = bo->trevsorted = 0;
+ bo->tkey = 0;
BATsetcount(bo, cnt);
BBPunfix(bpx->batCacheid);
BBPunfix(bpy->batCacheid);
diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -53,9 +53,6 @@ geom_2_geom_bat(bat *outBAT_id, bat *inB
outWKB = NULL;
}
- //set some properties of the new BAT
- BATsetcount(outBAT, BATcount(inBAT));
- BATsettrivprop(outBAT);
BBPunfix(inBAT->batCacheid);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -145,9 +142,6 @@ wkbCoordinateFromMBR_bat(bat *outBAT_id,
BUNappend(outBAT, &outDbl, TRUE);
}
- //set some properties of the new BAT
- BATsetcount(outBAT, BATcount(inBAT));
- BATsettrivprop(outBAT);
BBPunfix(inBAT->batCacheid);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -799,9 +793,6 @@ wkbFromWKB_bat(bat *outBAT_id, bat *inBA
outWKB = NULL;
}
- //set some properties of the new BAT
- BATsetcount(outBAT, BATcount(inBAT));
- BATsettrivprop(outBAT);
BBPunfix(inBAT->batCacheid);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -1099,13 +1090,6 @@ wkbFilter_bat(bat *aBATfiltered_id, bat
}
}
- //set some properties of the new BATs
- BATsetcount(aBATfiltered, remainingElements);
- BATsettrivprop(aBATfiltered);
-
- BATsetcount(bBATfiltered, remainingElements);
- BATsettrivprop(bBATfiltered);
-
BBPunfix(aBAT->batCacheid);
BBPunfix(bBAT->batCacheid);
BBPkeepref(*aBATfiltered_id = aBATfiltered->batCacheid);
@@ -1183,10 +1167,6 @@ wkbFilter_geom_bat(bat *BATfiltered_id,
GDKfree(MBRoriginal);
}
- //set some properties of the new BATs
- BATsetcount(BATfiltered, remainingElements);
- BATsettrivprop(BATfiltered);
-
BBPunfix(BAToriginal->batCacheid);
BBPkeepref(*BATfiltered_id = BATfiltered->batCacheid);
@@ -1239,9 +1219,6 @@ wkbMBR_bat(bat *outBAT_id, bat *inBAT_id
outMBR = NULL;
}
- //set some properties of the new BAT
- BATsetcount(outBAT, BATcount(inBAT));
- BATsettrivprop(outBAT);
BBPunfix(inBAT->batCacheid);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
diff --git a/monetdb5/modules/mal/mat.c b/monetdb5/modules/mal/mat.c
--- a/monetdb5/modules/mal/mat.c
+++ b/monetdb5/modules/mal/mat.c
@@ -82,7 +82,6 @@ MATpackInternal(Client cntxt, MalBlkPtr
}
}
assert(!bn->tnil || !bn->tnonil);
- BATsettrivprop(bn);
BBPkeepref(*ret = bn->batCacheid);
return MAL_SUCCEED;
}
diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c
--- a/monetdb5/modules/mal/tablet.c
+++ b/monetdb5/modules/mal/tablet.c
@@ -227,6 +227,9 @@ TABLETcollect(BAT **bats, Tablet *as)
bats[j] = fmt[i].c;
BBPfix(bats[j]->batCacheid);
BATsetaccess(fmt[i].c, BAT_READ);
+ fmt[i].c->tsorted = fmt[i].c->trevsorted = 0;
+ fmt[i].c->tkey = 0;
+ fmt[i].c->tnil = fmt[i].c->tnonil = 0;
BATsettrivprop(fmt[i].c);
if (cnt != BATcount(fmt[i].c))
@@ -254,7 +257,6 @@ TABLETcollect_parts(BAT **bats, Tablet *
BATsetaccess(b, BAT_READ);
bv = BATslice(b, (offset > 0) ? offset - 1 : 0, BATcount(b));
bats[j] = bv;
- BATsettrivprop(bv);
b->tkey = (offset > 0) ? FALSE : bv->tkey;
b->tnonil &= bv->tnonil;
diff --git a/sql/backends/monet5/generator/generator.c
b/sql/backends/monet5/generator/generator.c
--- a/sql/backends/monet5/generator/generator.c
+++ b/sql/backends/monet5/generator/generator.c
@@ -677,8 +677,12 @@ wrapup:
if( cndid)
BBPunfix(cndid);
if( bn){
+ bn->tsorted = 1;
+ bn->trevsorted = 0;
+ bn->tkey = 1;
+ bn->tnil = 0;
+ bn->tnonil = 1;
BATsetcount(bn,c);
- BATsettrivprop(bn);
BBPkeepref(*getArgReference_bat(stk,pci,0)= bn->batCacheid);
}
return msg;
@@ -797,8 +801,11 @@ str VLTgenerator_projection(Client cntxt
/* adminstrative wrapup of the projection */
BBPunfix(bid);
if( bn){
+ bn->tsorted = bn->trevsorted = 0;
+ bn->tkey = 0;
+ bn->tnil = 0;
+ bn->tnonil = 0;
BATsetcount(bn,c);
- BATsettrivprop(bn);
BBPkeepref(*getArgReference_bat(stk,pci,0)= bn->batCacheid);
}
return MAL_SUCCEED;
@@ -920,15 +927,21 @@ str VLTgenerator_join(Client cntxt, MalB
throw(MAL,"generator.join","Illegal type");
}
+ bln->tsorted = bln->trevsorted = 0;
+ bln->tkey = 0;
+ bln->tnil = 0;
+ bln->tnonil = 0;
BATsetcount(bln,c);
bln->tsorted = incr || c <= 1;
bln->trevsorted = !incr || c <= 1;
- BATsettrivprop(bln);
+ brn->tsorted = brn->trevsorted = 0;
+ brn->tkey = 0;
+ brn->tnil = 0;
+ brn->tnonil = 0;
BATsetcount(brn,c);
brn->tsorted = incr || c <= 1;
brn->trevsorted = !incr || c <= 1;
- BATsettrivprop(brn);
if( q){
BBPkeepref(*getArgReference_bat(stk,pci,0)= brn->batCacheid);
BBPkeepref(*getArgReference_bat(stk,pci,1)= bln->batCacheid);
@@ -1055,15 +1068,21 @@ str VLTgenerator_rangejoin(Client cntxt,
throw(MAL,"generator.rangejoin","Illegal type");
}
+ bln->tsorted = bln->trevsorted = 0;
+ bln->tkey = 0;
+ bln->tnil = 0;
+ bln->tnonil = 0;
BATsetcount(bln,c);
bln->tsorted = incr || c <= 1;
bln->trevsorted = !incr || c <= 1;
- BATsettrivprop(bln);
+ brn->tsorted = brn->trevsorted = 0;
+ brn->tkey = 0;
+ brn->tnil = 0;
+ brn->tnonil = 0;
BATsetcount(brn,c);
brn->tsorted = incr || c <= 1;
brn->trevsorted = !incr || c <= 1;
- BATsettrivprop(brn);
BBPkeepref(*getArgReference_bat(stk,pci,0)= bln->batCacheid);
BBPkeepref(*getArgReference_bat(stk,pci,1)= brn->batCacheid);
return msg;
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
@@ -3618,7 +3618,6 @@ mvc_bin_import_table_wrap(Client cntxt,
if (c == NULL)
throw(SQL, "sql", "Failed to attach file %s",
*getArgReference_str(stk, pci, i));
BATsetaccess(c, BAT_READ);
- BATsettrivprop(c);
} else if (tpe == TYPE_str) {
/* get the BAT and fill it with the strings */
c = COLnew(0, TYPE_str, 0, PERSISTENT);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list