Changeset: 160836c6906d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=160836c6906d
Added Files:
sql/test/BugTracker-2014/Tests/empty_intermediate_quantile.Bug-3611.stable.err
sql/test/BugTracker-2014/Tests/empty_intermediate_quantile.Bug-3611.stable.out
sql/test/BugTracker-2014/Tests/fk-property-assert.Bug-3612.sql
sql/test/BugTracker-2014/Tests/fk-property-assert.Bug-3612.stable.err
sql/test/BugTracker-2014/Tests/fk-property-assert.Bug-3612.stable.out
Modified Files:
gdk/gdk_aggr.c
gdk/gdk_bat.c
gdk/gdk_batop.c
gdk/gdk_group.c
gdk/gdk_select.c
monetdb5/modules/kernel/aggr.c
monetdb5/modules/mal/mkey.c
sql/test/BugTracker-2014/Tests/All
sql/test/BugTracker-2014/Tests/empty_intermediate_quantile.Bug-3611.sql
Branch: default
Log Message:
Merge with Oct2014 branch.
diffs (truncated from 896 to 300 lines):
diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c
--- a/gdk/gdk_aggr.c
+++ b/gdk/gdk_aggr.c
@@ -323,10 +323,10 @@ dosum(const void *values, int nonil, oid
return BUN_NONE;
}
- switch (ATOMstorage(tp2)) {
+ switch (tp2) {
case TYPE_bte: {
bte *sums = (bte *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
AGGR_SUM(bte, bte);
break;
@@ -337,7 +337,7 @@ dosum(const void *values, int nonil, oid
}
case TYPE_sht: {
sht *sums = (sht *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
AGGR_SUM(bte, sht);
break;
@@ -349,15 +349,21 @@ dosum(const void *values, int nonil, oid
}
break;
}
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
case TYPE_int: {
int *sums = (int *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
AGGR_SUM(bte, int);
break;
case TYPE_sht:
AGGR_SUM(sht, int);
break;
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
case TYPE_int:
AGGR_SUM(int, int);
break;
@@ -366,18 +372,27 @@ dosum(const void *values, int nonil, oid
}
break;
}
+#if SIZEOF_WRD == SIZEOF_LNG
+ case TYPE_wrd:
+#endif
case TYPE_lng: {
lng *sums = (lng *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
AGGR_SUM(bte, lng);
break;
case TYPE_sht:
AGGR_SUM(sht, lng);
break;
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
case TYPE_int:
AGGR_SUM(int, lng);
break;
+#if SIZEOF_WRD == SIZEOF_LNG
+ case TYPE_wrd:
+#endif
case TYPE_lng:
AGGR_SUM(lng, lng);
break;
@@ -413,7 +428,7 @@ dosum(const void *values, int nonil, oid
#endif
case TYPE_flt: {
flt *sums = (flt *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_flt:
AGGR_SUM(flt, flt);
break;
@@ -424,7 +439,7 @@ dosum(const void *values, int nonil, oid
}
case TYPE_dbl: {
dbl *sums = (dbl *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_flt:
AGGR_SUM(flt, dbl);
break;
@@ -556,16 +571,22 @@ BATsum(void *res, int tp, BAT *b, BAT *s
GDKerror("BATsum: %s\n", err);
return GDK_FAIL;
}
- switch (ATOMstorage(tp)) {
+ switch (tp) {
case TYPE_bte:
* (bte *) res = nil_if_empty ? bte_nil : 0;
break;
case TYPE_sht:
* (sht *) res = nil_if_empty ? sht_nil : 0;
break;
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
case TYPE_int:
* (int *) res = nil_if_empty ? int_nil : 0;
break;
+#if SIZEOF_WRD == SIZEOF_LNG
+ case TYPE_wrd:
+#endif
case TYPE_lng:
* (lng *) res = nil_if_empty ? lng_nil : 0;
break;
@@ -576,10 +597,11 @@ BATsum(void *res, int tp, BAT *b, BAT *s
#endif
case TYPE_flt:
case TYPE_dbl:
- switch (ATOMstorage(b->ttype)) {
+ switch (b->ttype) {
case TYPE_bte:
case TYPE_sht:
case TYPE_int:
+ case TYPE_wrd:
case TYPE_lng:
#ifdef HAVE_HGE
case TYPE_hge:
@@ -605,7 +627,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s
/* there were nils */
avg = dbl_nil;
}
- if (ATOMstorage(tp) == TYPE_flt) {
+ if (tp == TYPE_flt) {
if (avg == dbl_nil)
*(flt *) res = flt_nil;
else if (cnt > 0 &&
@@ -637,7 +659,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s
default:
break;
}
- if (ATOMstorage(b->ttype) == TYPE_dbl)
+ if (b->ttype == TYPE_dbl)
* (dbl *) res = nil_if_empty ? dbl_nil : 0;
else
* (flt *) res = nil_if_empty ? flt_nil : 0;
@@ -872,10 +894,10 @@ doprod(const void *values, oid seqb, BUN
return GDK_FAIL;
}
- switch (ATOMstorage(tp2)) {
+ switch (tp2) {
case TYPE_bte: {
bte *prods = (bte *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
AGGR_PROD(bte, bte, sht);
break;
@@ -886,7 +908,7 @@ doprod(const void *values, oid seqb, BUN
}
case TYPE_sht: {
sht *prods = (sht *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
AGGR_PROD(bte, sht, int);
break;
@@ -898,9 +920,12 @@ doprod(const void *values, oid seqb, BUN
}
break;
}
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
case TYPE_int: {
int *prods = (int *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
AGGR_PROD(bte, int, lng);
break;
@@ -908,6 +933,9 @@ doprod(const void *values, oid seqb, BUN
AGGR_PROD(sht, int, lng);
break;
case TYPE_int:
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
AGGR_PROD(int, int, lng);
break;
default:
@@ -916,6 +944,9 @@ doprod(const void *values, oid seqb, BUN
break;
}
#ifdef HAVE_HGE
+#if SIZEOF_WRD == SIZEOF_LNG
+ case TYPE_wrd:
+#endif
case TYPE_lng: {
lng *prods = (lng *) results;
switch (ATOMstorage(tp1)) {
@@ -926,9 +957,15 @@ doprod(const void *values, oid seqb, BUN
AGGR_PROD(sht, lng, hge);
break;
case TYPE_int:
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
AGGR_PROD(int, lng, hge);
break;
case TYPE_lng:
+#if SIZEOF_WRD == SIZEOF_LNG
+ case TYPE_wrd:
+#endif
AGGR_PROD(lng, lng, hge);
break;
default:
@@ -946,9 +983,15 @@ doprod(const void *values, oid seqb, BUN
AGGR_PROD_HGE(sht);
break;
case TYPE_int:
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
AGGR_PROD_HGE(int);
break;
case TYPE_lng:
+#if SIZEOF_WRD == SIZEOF_LNG
+ case TYPE_wrd:
+#endif
AGGR_PROD_HGE(lng);
break;
case TYPE_hge:
@@ -960,9 +1003,12 @@ doprod(const void *values, oid seqb, BUN
break;
}
#else
+#if SIZEOF_WRD == SIZEOF_LNG
+ case TYPE_wrd:
+#endif
case TYPE_lng: {
lng *prods = (lng *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
AGGR_PROD_LNG(bte);
break;
@@ -970,9 +1016,15 @@ doprod(const void *values, oid seqb, BUN
AGGR_PROD_LNG(sht);
break;
case TYPE_int:
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
AGGR_PROD_LNG(int);
break;
case TYPE_lng:
+#if SIZEOF_WRD == SIZEOF_LNG
+ case TYPE_wrd:
+#endif
AGGR_PROD_LNG(lng);
break;
default:
@@ -983,7 +1035,7 @@ doprod(const void *values, oid seqb, BUN
#endif
case TYPE_flt: {
flt *prods = (flt *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
AGGR_PROD_FLOAT(bte, flt);
break;
@@ -991,9 +1043,15 @@ doprod(const void *values, oid seqb, BUN
AGGR_PROD_FLOAT(sht, flt);
break;
case TYPE_int:
+#if SIZEOF_WRD == SIZEOF_INT
+ case TYPE_wrd:
+#endif
AGGR_PROD_FLOAT(int, flt);
break;
case TYPE_lng:
+#if SIZEOF_WRD == SIZEOF_LNG
+ case TYPE_wrd:
+#endif
AGGR_PROD_FLOAT(lng, flt);
break;
#ifdef HAVE_HGE
@@ -1011,7 +1069,7 @@ doprod(const void *values, oid seqb, BUN
}
case TYPE_dbl: {
dbl *prods = (dbl *) results;
- switch (ATOMstorage(tp1)) {
+ switch (tp1) {
case TYPE_bte:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list