Changeset: 6dd4926090c1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6dd4926090c1
Modified Files:
gdk/gdk_calc.c
gdk/gdk_calc_compare.h
java/ChangeLog
java/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java
java/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
java/tests/build.xml
sql/backends/monet5/rel_bin.c
sql/server/rel_optimizer.c
sql/server/rel_select.c
tools/merovingian/daemon/connections.c
tools/merovingian/daemon/connections.h
tools/merovingian/daemon/merovingian.c
Branch: mosaic
Log Message:
merge with default
diffs (truncated from 824 to 300 lines):
diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -124,14 +124,16 @@ checkbats(BAT *b1, BAT *b2, const char *
CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, 0, start); \
for (i = start * incr1, j = start * incr2, k = start; \
k < end; i += incr1, j += incr2, k++) { \
+ register TYPE1 v1; \
+ register TYPE2 v2; \
CHECKCAND((TYPE3 *) dst, k, candoff, TYPE3##_nil); \
- if (((const TYPE1 *) lft)[i] == TYPE1##_nil || \
- ((const TYPE2 *) rgt)[j] == TYPE2##_nil) { \
+ v1 = ((const TYPE1 *) lft)[i]; \
+ v2 = ((const TYPE2 *) rgt)[j]; \
+ if (v1 == TYPE1##_nil || v2 == TYPE2##_nil) { \
nils++; \
((TYPE3 *) dst)[k] = TYPE3##_nil; \
} else { \
- ((TYPE3 *) dst)[k] = FUNC(((const TYPE1 *)
lft)[i], \
- ((const TYPE2 *)
rgt)[j]); \
+ ((TYPE3 *) dst)[k] = FUNC(v1, v2); \
} \
} \
CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, end, cnt); \
@@ -141,9 +143,14 @@ checkbats(BAT *b1, BAT *b2, const char *
do { \
CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, 0, start); \
for (i = start * incr1, j = start * incr2, k = start; \
- k < end; i += incr1, j += incr2, k++) \
- ((TYPE3 *) dst)[k] = FUNC(((const TYPE1 *) lft)[i], \
- ((const TYPE2 *) rgt)[j]); \
+ k < end; i += incr1, j += incr2, k++) { \
+ register TYPE1 v1; \
+ register TYPE2 v2; \
+ CHECKCAND((TYPE3 *) dst, k, candoff, TYPE3##_nil); \
+ v1 = ((const TYPE1 *) lft)[i]; \
+ v2 = ((const TYPE2 *) rgt)[j]; \
+ ((TYPE3 *) dst)[k] = FUNC(v1, v2); \
+ } \
CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, end, cnt); \
} while (0)
@@ -152,26 +159,27 @@ checkbats(BAT *b1, BAT *b2, const char *
CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, 0, start); \
for (i = start * incr1, j = start * incr2, k = start; \
k < end; i += incr1, j += incr2, k++) { \
+ register TYPE1 v1; \
+ register TYPE2 v2; \
CHECKCAND((TYPE3 *) dst, k, candoff, TYPE3##_nil); \
- if (((const TYPE1 *) lft)[i] == TYPE1##_nil || \
- ((const TYPE2 *) rgt)[j] == TYPE2##_nil) { \
+ v1 = ((const TYPE1 *) lft)[i]; \
+ v2 = ((const TYPE2 *) rgt)[j]; \
+ if (v1 == TYPE1##_nil || v2 == TYPE2##_nil) { \
nils++; \
((TYPE3 *) dst)[k] = TYPE3##_nil; \
- } else if (CHECK(((const TYPE1 *) lft)[i], \
- ((const TYPE2 *) rgt)[j])) { \
+ } else if (CHECK(v1, v2)) { \
if (abort_on_error) { \
GDKerror("%s: shift operand too large
in " \
#FUNC"("FMT##TYPE1","FMT##TYPE2").\n", \
func, \
- CST##TYPE1 ((const TYPE1 *)
lft)[i], \
- CST##TYPE2 ((const TYPE2 *)
rgt)[j]); \
+ CST##TYPE1 v1, \
+ CST##TYPE2 v2); \
goto checkfail; \
} \
((TYPE3 *)dst)[k] = TYPE3##_nil; \
nils++; \
} else { \
- ((TYPE3 *) dst)[k] = FUNC(((const TYPE1 *)
lft)[i], \
- ((const TYPE2 *)
rgt)[j]); \
+ ((TYPE3 *) dst)[k] = FUNC(v1, v2); \
} \
} \
CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, end, cnt); \
@@ -12407,13 +12415,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#define op_typeswitchloop lt_typeswitchloop
#define BATcalcop_intern BATcalclt_intern
#define BATcalcop BATcalclt
-#define BATcalcop_name "BATcalclt"
#define BATcalcopcst BATcalcltcst
-#define BATcalcopcst_name "BATcalcltcst"
#define BATcalccstop BATcalccstlt
-#define BATcalccstop_name "BATcalccstlt"
#define VARcalcop VARcalclt
-#define VARcalcop_name "VARcalclt"
#include "gdk_calc_compare.h"
@@ -12421,13 +12425,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#undef op_typeswitchloop
#undef BATcalcop_intern
#undef BATcalcop
-#undef BATcalcop_name
#undef BATcalcopcst
-#undef BATcalcopcst_name
#undef BATcalccstop
-#undef BATcalccstop_name
#undef VARcalcop
-#undef VARcalcop_name
/* ---------------------------------------------------------------------- */
/* greater than (any "linear" type) */
@@ -12436,13 +12436,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#define op_typeswitchloop gt_typeswitchloop
#define BATcalcop_intern BATcalcgt_intern
#define BATcalcop BATcalcgt
-#define BATcalcop_name "BATcalcgt"
#define BATcalcopcst BATcalcgtcst
-#define BATcalcopcst_name "BATcalcgtcst"
#define BATcalccstop BATcalccstgt
-#define BATcalccstop_name "BATcalccstgt"
#define VARcalcop VARcalcgt
-#define VARcalcop_name "VARcalclt"
#include "gdk_calc_compare.h"
@@ -12450,13 +12446,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#undef op_typeswitchloop
#undef BATcalcop_intern
#undef BATcalcop
-#undef BATcalcop_name
#undef BATcalcopcst
-#undef BATcalcopcst_name
#undef BATcalccstop
-#undef BATcalccstop_name
#undef VARcalcop
-#undef VARcalcop_name
/* ---------------------------------------------------------------------- */
/* less than or equal (any "linear" type) */
@@ -12467,13 +12459,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#define op_typeswitchloop le_typeswitchloop
#define BATcalcop_intern BATcalcle_intern
#define BATcalcop BATcalcle
-#define BATcalcop_name "BATcalcle"
#define BATcalcopcst BATcalclecst
-#define BATcalcopcst_name "BATcalclecst"
#define BATcalccstop BATcalccstle
-#define BATcalccstop_name "BATcalccstle"
#define VARcalcop VARcalcle
-#define VARcalcop_name "VARcalcle"
#include "gdk_calc_compare.h"
@@ -12481,13 +12469,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#undef op_typeswitchloop
#undef BATcalcop_intern
#undef BATcalcop
-#undef BATcalcop_name
#undef BATcalcopcst
-#undef BATcalcopcst_name
#undef BATcalccstop
-#undef BATcalccstop_name
#undef VARcalcop
-#undef VARcalcop_name
/* ---------------------------------------------------------------------- */
/* greater than or equal (any "linear" type) */
@@ -12498,13 +12482,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#define op_typeswitchloop ge_typeswitchloop
#define BATcalcop_intern BATcalcge_intern
#define BATcalcop BATcalcge
-#define BATcalcop_name "BATcalcge"
#define BATcalcopcst BATcalcgecst
-#define BATcalcopcst_name "BATcalcgecst"
#define BATcalccstop BATcalccstge
-#define BATcalccstop_name "BATcalccstge"
#define VARcalcop VARcalcge
-#define VARcalcop_name "VARcalcge"
#include "gdk_calc_compare.h"
@@ -12512,13 +12492,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#undef op_typeswitchloop
#undef BATcalcop_intern
#undef BATcalcop
-#undef BATcalcop_name
#undef BATcalcopcst
-#undef BATcalcopcst_name
#undef BATcalccstop
-#undef BATcalccstop_name
#undef VARcalcop
-#undef VARcalcop_name
/* ---------------------------------------------------------------------- */
/* equal (any type) */
@@ -12529,13 +12505,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#define op_typeswitchloop eq_typeswitchloop
#define BATcalcop_intern BATcalceq_intern
#define BATcalcop BATcalceq
-#define BATcalcop_name "BATcalceq"
#define BATcalcopcst BATcalceqcst
-#define BATcalcopcst_name "BATcalceqcst"
#define BATcalccstop BATcalccsteq
-#define BATcalccstop_name "BATcalccsteq"
#define VARcalcop VARcalceq
-#define VARcalcop_name "VARcalceq"
#include "gdk_calc_compare.h"
@@ -12543,13 +12515,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#undef op_typeswitchloop
#undef BATcalcop_intern
#undef BATcalcop
-#undef BATcalcop_name
#undef BATcalcopcst
-#undef BATcalcopcst_name
#undef BATcalccstop
-#undef BATcalccstop_name
#undef VARcalcop
-#undef VARcalcop_name
/* ---------------------------------------------------------------------- */
/* not equal (any type) */
@@ -12560,13 +12528,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#define op_typeswitchloop ne_typeswitchloop
#define BATcalcop_intern BATcalcne_intern
#define BATcalcop BATcalcne
-#define BATcalcop_name "BATcalcne"
#define BATcalcopcst BATcalcnecst
-#define BATcalcopcst_name "BATcalcnecst"
#define BATcalccstop BATcalccstne
-#define BATcalccstop_name "BATcalccstne"
#define VARcalcop VARcalcne
-#define VARcalcop_name "VARcalcne"
#include "gdk_calc_compare.h"
@@ -12574,13 +12538,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#undef op_typeswitchloop
#undef BATcalcop_intern
#undef BATcalcop
-#undef BATcalcop_name
#undef BATcalcopcst
-#undef BATcalcopcst_name
#undef BATcalccstop
-#undef BATcalccstop_name
#undef VARcalcop
-#undef VARcalcop_name
#undef TYPE_TPE
#undef TPE
@@ -12589,7 +12549,8 @@ VARcalcrsh(ValPtr ret, const ValRecord *
/* ---------------------------------------------------------------------- */
/* generic comparison (any "linear" type) */
-#define CMP(a, b) ((bte) ((a) < (b) ? -1 : (a) > (b)))
+/* #define CMP(a, b) ((bte) ((a) < (b) ? -1 : (a) > (b))) */
+#define CMP(a, b) ((bte) (((a) > (b)) - ((a) < (b))))
#define TYPE_TPE TYPE_bte
#define TPE bte
@@ -12599,13 +12560,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#define op_typeswitchloop cmp_typeswitchloop
#define BATcalcop_intern BATcalccmp_intern
#define BATcalcop BATcalccmp
-#define BATcalcop_name "BATcalccmp"
#define BATcalcopcst BATcalccmpcst
-#define BATcalcopcst_name "BATcalccmpcst"
#define BATcalccstop BATcalccstcmp
-#define BATcalccstop_name "BATcalccstcmp"
#define VARcalcop VARcalccmp
-#define VARcalcop_name "VARcalccmp"
#include "gdk_calc_compare.h"
@@ -12613,13 +12570,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
#undef op_typeswitchloop
#undef BATcalcop_intern
#undef BATcalcop
-#undef BATcalcop_name
#undef BATcalcopcst
-#undef BATcalcopcst_name
#undef BATcalccstop
-#undef BATcalccstop_name
#undef VARcalcop
-#undef VARcalcop_name
#undef TYPE_TPE
#undef TPE
diff --git a/gdk/gdk_calc_compare.h b/gdk/gdk_calc_compare.h
--- a/gdk/gdk_calc_compare.h
+++ b/gdk/gdk_calc_compare.h
@@ -629,10 +629,10 @@ BATcalcop(BAT *b1, BAT *b2, BAT *s)
BUN start, end, cnt;
const oid *restrict cand = NULL, *candend = NULL;
- BATcheck(b1, BATcalcop_name, NULL);
- BATcheck(b2, BATcalcop_name, NULL);
+ BATcheck(b1, __func__, NULL);
+ BATcheck(b2, __func__, NULL);
- if (checkbats(b1, b2, BATcalcop_name) != GDK_SUCCEED)
+ if (checkbats(b1, b2, __func__) != GDK_SUCCEED)
return NULL;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list