Changeset: 5bf0032b2b7b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5bf0032b2b7b
Modified Files:
clients/Tests/MAL-signatures_all.stable.out
clients/Tests/MAL-signatures_all.stable.out.int128
clients/Tests/MAL-signatures_fits_geom.stable.out
clients/Tests/MAL-signatures_fits_geom.stable.out.int128
clients/Tests/MAL-signatures_geom.stable.out
clients/Tests/MAL-signatures_geom.stable.out.int128
clients/Tests/MAL-signatures_none.stable.out
clients/Tests/MAL-signatures_none.stable.out.int128
gdk/gdk_calc.c
monetdb5/ChangeLog
monetdb5/mal/Tests/tst1505.mal
monetdb5/mal/Tests/tst1505.stable.out
monetdb5/mal/Tests/tst1506.mal
monetdb5/mal/Tests/tst1506.stable.out
monetdb5/mal/Tests/tst909.mal
monetdb5/modules/mal/01_batcalc.mal
monetdb5/modules/mal/batcalc.c
Branch: default
Log Message:
Removed function batcalc.ifthen and its implementation.
It's not a "headless" function, and it wasn't used by SQL.
diffs (truncated from 666 to 300 lines):
diff --git a/clients/Tests/MAL-signatures_all.stable.out
b/clients/Tests/MAL-signatures_all.stable.out
--- a/clients/Tests/MAL-signatures_all.stable.out
+++ b/clients/Tests/MAL-signatures_all.stable.out
@@ -24804,10 +24804,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],b1:bat[:oid,:any_1]):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern
batcalc.ifthenelse(b:bat[:oid,:bit],v1:any_1,b2:bat[:oid,:any_1]):bat[:oid,:any_1]
address CMDifthen;
comment If-then-else operation to assemble a conditional result
@@ -24820,10 +24816,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],v1:any_1):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern batcalc.int_noerror(b:bat[:oid,:str],s:bat[:oid,:oid]):bat[:oid,:int]
address CMDconvert_int;
comment cast from str to int with candidates list
diff --git a/clients/Tests/MAL-signatures_all.stable.out.int128
b/clients/Tests/MAL-signatures_all.stable.out.int128
--- a/clients/Tests/MAL-signatures_all.stable.out.int128
+++ b/clients/Tests/MAL-signatures_all.stable.out.int128
@@ -32049,10 +32049,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],b1:bat[:oid,:any_1]):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern
batcalc.ifthenelse(b:bat[:oid,:bit],v1:any_1,b2:bat[:oid,:any_1]):bat[:oid,:any_1]
address CMDifthen;
comment If-then-else operation to assemble a conditional result
@@ -32065,10 +32061,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],v1:any_1):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern batcalc.int_noerror(b:bat[:oid,:str],s:bat[:oid,:oid]):bat[:oid,:int]
address CMDconvert_int;
comment cast from str to int with candidates list
diff --git a/clients/Tests/MAL-signatures_fits_geom.stable.out
b/clients/Tests/MAL-signatures_fits_geom.stable.out
--- a/clients/Tests/MAL-signatures_fits_geom.stable.out
+++ b/clients/Tests/MAL-signatures_fits_geom.stable.out
@@ -24725,10 +24725,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],b1:bat[:oid,:any_1]):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern
batcalc.ifthenelse(b:bat[:oid,:bit],v1:any_1,b2:bat[:oid,:any_1]):bat[:oid,:any_1]
address CMDifthen;
comment If-then-else operation to assemble a conditional result
@@ -24741,10 +24737,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],v1:any_1):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern batcalc.int_noerror(b:bat[:oid,:str],s:bat[:oid,:oid]):bat[:oid,:int]
address CMDconvert_int;
comment cast from str to int with candidates list
diff --git a/clients/Tests/MAL-signatures_fits_geom.stable.out.int128
b/clients/Tests/MAL-signatures_fits_geom.stable.out.int128
--- a/clients/Tests/MAL-signatures_fits_geom.stable.out.int128
+++ b/clients/Tests/MAL-signatures_fits_geom.stable.out.int128
@@ -31975,10 +31975,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],b1:bat[:oid,:any_1]):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern
batcalc.ifthenelse(b:bat[:oid,:bit],v1:any_1,b2:bat[:oid,:any_1]):bat[:oid,:any_1]
address CMDifthen;
comment If-then-else operation to assemble a conditional result
@@ -31991,10 +31987,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],v1:any_1):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern batcalc.int_noerror(b:bat[:oid,:str],s:bat[:oid,:oid]):bat[:oid,:int]
address CMDconvert_int;
comment cast from str to int with candidates list
diff --git a/clients/Tests/MAL-signatures_geom.stable.out
b/clients/Tests/MAL-signatures_geom.stable.out
--- a/clients/Tests/MAL-signatures_geom.stable.out
+++ b/clients/Tests/MAL-signatures_geom.stable.out
@@ -24725,10 +24725,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],b1:bat[:oid,:any_1]):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern
batcalc.ifthenelse(b:bat[:oid,:bit],v1:any_1,b2:bat[:oid,:any_1]):bat[:oid,:any_1]
address CMDifthen;
comment If-then-else operation to assemble a conditional result
@@ -24741,10 +24737,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],v1:any_1):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern batcalc.int_noerror(b:bat[:oid,:str],s:bat[:oid,:oid]):bat[:oid,:int]
address CMDconvert_int;
comment cast from str to int with candidates list
diff --git a/clients/Tests/MAL-signatures_geom.stable.out.int128
b/clients/Tests/MAL-signatures_geom.stable.out.int128
--- a/clients/Tests/MAL-signatures_geom.stable.out.int128
+++ b/clients/Tests/MAL-signatures_geom.stable.out.int128
@@ -31975,10 +31975,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],b1:bat[:oid,:any_1]):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern
batcalc.ifthenelse(b:bat[:oid,:bit],v1:any_1,b2:bat[:oid,:any_1]):bat[:oid,:any_1]
address CMDifthen;
comment If-then-else operation to assemble a conditional result
@@ -31991,10 +31987,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],v1:any_1):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern batcalc.int_noerror(b:bat[:oid,:str],s:bat[:oid,:oid]):bat[:oid,:int]
address CMDconvert_int;
comment cast from str to int with candidates list
diff --git a/clients/Tests/MAL-signatures_none.stable.out
b/clients/Tests/MAL-signatures_none.stable.out
--- a/clients/Tests/MAL-signatures_none.stable.out
+++ b/clients/Tests/MAL-signatures_none.stable.out
@@ -24720,10 +24720,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],b1:bat[:oid,:any_1]):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern
batcalc.ifthenelse(b:bat[:oid,:bit],v1:any_1,b2:bat[:oid,:any_1]):bat[:oid,:any_1]
address CMDifthen;
comment If-then-else operation to assemble a conditional result
@@ -24736,10 +24732,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],v1:any_1):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern batcalc.int_noerror(b:bat[:oid,:str],s:bat[:oid,:oid]):bat[:oid,:int]
address CMDconvert_int;
comment cast from str to int with candidates list
diff --git a/clients/Tests/MAL-signatures_none.stable.out.int128
b/clients/Tests/MAL-signatures_none.stable.out.int128
--- a/clients/Tests/MAL-signatures_none.stable.out.int128
+++ b/clients/Tests/MAL-signatures_none.stable.out.int128
@@ -31969,10 +31969,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],b1:bat[:oid,:any_1]):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern
batcalc.ifthenelse(b:bat[:oid,:bit],v1:any_1,b2:bat[:oid,:any_1]):bat[:oid,:any_1]
address CMDifthen;
comment If-then-else operation to assemble a conditional result
@@ -31985,10 +31981,6 @@ pattern batcalc.ifthenelse(b:bat[:oid,:b
address CMDifthen;
comment If-then-else operation to assemble a conditional result
-pattern batcalc.ifthen(b:bat[:oid,:bit],v1:any_1):bat[:oid,:any_1]
-address CMDifthen;
-comment If-then operation to assemble a conditional result
-
pattern batcalc.int_noerror(b:bat[:oid,:str],s:bat[:oid,:oid]):bat[:oid,:int]
address CMDconvert_int;
comment cast from str to int with candidates list
diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -11711,16 +11711,12 @@ VARcalcbetween(ValPtr ret, const ValReco
do { \
for (i = 0; i < cnt; i++) { \
if (src[i] == bit_nil) { \
- if (hd) \
- *hd++ = (oid) i + off; \
- ((TYPE *) dst)[j++] = * (TYPE *) nil; \
+ ((TYPE *) dst)[i] = * (TYPE *) nil; \
nils++; \
} else if (src[i]) { \
- if (hd) \
- *hd++ = (oid) i + off; \
- ((TYPE *) dst)[j++] = ((TYPE *) col1)[k]; \
- } else if (col2) { \
- ((TYPE *) dst)[j++] = ((TYPE *) col2)[l]; \
+ ((TYPE *) dst)[i] = ((TYPE *) col1)[k]; \
+ } else { \
+ ((TYPE *) dst)[i] = ((TYPE *) col2)[l]; \
} \
k += incr1; \
l += incr2; \
@@ -11737,18 +11733,16 @@ BATcalcifthenelse_intern(BAT *b,
{
BAT *bn;
void *dst;
- oid *hd;
- BUN i, j, k, l;
+ BUN i, k, l;
BUN nils = 0;
const void *nil;
const void *p;
const bit *src;
- oid off = BAThdense(b) ? b->H->seq : 0;
BUN cnt = b->batCount;
- assert(col2 != NULL || incr2 == 0);
-
- bn = BATnew(col2 || off == oid_nil ? TYPE_void : TYPE_oid, tpe, cnt,
TRANSIENT);
+ assert(col2 != NULL);
+
+ bn = BATnew(TYPE_void, tpe, cnt, TRANSIENT);
if (bn == NULL)
return NULL;
@@ -11756,8 +11750,7 @@ BATcalcifthenelse_intern(BAT *b,
nil = ATOMnilptr(tpe);
dst = (void *) Tloc(bn, bn->batFirst);
- hd = col2 || off == oid_nil ? NULL : (oid *) Hloc(bn, bn->batFirst);
- j = k = l = 0;
+ k = l = 0;
if (bn->T->varsized) {
assert((heap1 != NULL && width1 > 0) || (width1 == 0 && incr1
== 0));
assert((heap2 != NULL && width2 > 0) || (width2 == 0 && incr2
== 0));
@@ -11770,20 +11763,13 @@ BATcalcifthenelse_intern(BAT *b,
p = heap1 + VarHeapVal(col1, k, width1);
else
p = col1;
- } else if (col2) {
+ } else {
if (heap2)
p = heap2 + VarHeapVal(col2, l, width2);
else
p = col2;
- } else {
- p = NULL;
- }
- if (p) {
- tfastins_nocheck(bn, j, p, Tsize(bn));
- if (hd)
- *hd++ = (oid) i + off;
- j++;
- }
+ }
+ tfastins_nocheck(bn, i, p, Tsize(bn));
k += incr1;
l += incr2;
}
@@ -11815,40 +11801,25 @@ BATcalcifthenelse_intern(BAT *b,
nils++;
} else if (src[i]) {
p = ((const char *) col1) + k * width1;
- } else if (col2) {
+ } else {
p = ((const char *) col2) + l * width2;
- } else {
- p = NULL;
}
- if (p) {
- memcpy(dst, p, bn->T->width);
- if (hd)
- *hd++ = (oid) i + off;
- j++;
- dst = (void *) ((char *) dst +
bn->T->width);
- }
+ memcpy(dst, p, bn->T->width);
+ dst = (void *) ((char *) dst + bn->T->width);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list