Changeset: 4a03dc172739 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a03dc172739
Modified Files:
Branch: default
Log Message:
Merge heads.
diffs (truncated from 1530 to 300 lines):
diff -r 0d3117e0b5ef -r 4a03dc172739 MonetDB5/src/modules/kernel/batmmath.mx
--- a/MonetDB5/src/modules/kernel/batmmath.mx Tue Nov 16 16:16:10 2010 +0100
+++ b/MonetDB5/src/modules/kernel/batmmath.mx Wed Nov 17 11:29:57 2010 +0100
@@ -53,6 +53,8 @@
@:scienceFcn(cosh)@
@:scienceFcn(sinh)@
@:scienceFcn(tanh)@
+ @:scienceFcn(radians)@
+ @:scienceFcn(degrees)@
@:scienceFcn(exp)@
@:scienceFcn(log)@
@:scienceFcn(log10)@
@@ -93,6 +95,8 @@
#define batmmath_export extern
#endif
+#define radians(x) x * 3.14159265358979323846 /180.0
+#define degrees(x) x * 180.0/3.14159265358979323846
@-
@= scienceFcnImpl
batmmath_export str cmdscience_b...@2_@1(int *ret, int *bid);
@@ -186,6 +190,8 @@
@:scienceImpl(cosh)@
@:scienceImpl(sinh)@
@:scienceImpl(tanh)@
+@:scienceImpl(radians)@
+@:scienceImpl(degrees)@
@:scienceImpl(exp)@
@:scienceImpl(log)@
@:scienceImpl(log10)@
diff -r 0d3117e0b5ef -r 4a03dc172739 MonetDB5/src/modules/kernel/mmath.mx
--- a/MonetDB5/src/modules/kernel/mmath.mx Tue Nov 16 16:16:10 2010 +0100
+++ b/MonetDB5/src/modules/kernel/mmath.mx Wed Nov 17 11:29:57 2010 +0100
@@ -116,6 +116,17 @@
comment "The tanh() function returns the hyperbolic tangent of x, which is
defined mathematically as sinh(x) / cosh(x).";
+command radians(x:flt) :flt
+address MATHunary_RADIANSflt;
+command radians(x:dbl) :dbl
+address MATHunary_RADIANSdbl
+comment "The radians() function converts degrees into radians";
+
+command degrees(x:flt) :flt
+address MATHunary_DEGREESflt;
+command degrees(x:dbl) :dbl
+address MATHunary_DEGREESdbl
+comment "The degrees() function converts radians into degrees";
command exp(x:flt) :flt
address MATHunary_EXPflt;
@@ -259,6 +270,8 @@
@:unopM5_export(_COSH)@
@:unopM5_export(_SINH)@
@:unopM5_export(_TANH)@
+@:unopM5_export(_RADIANS)@
+@:unopM5_export(_DEGREES)@
@:unopM5_export(_EXP)@
@:unopM5_export(_LOG)@
@@ -341,6 +354,9 @@
#define sinh_unary(x, z) *z = sinh(*x)
#define tanh_unary(x, z) *z = tanh(*x)
+#define radians_unary(x, z) *z = *x * 3.14159265358979323846 /180.0
+#define degrees_unary(x, z) *z = *x * 180.0/3.14159265358979323846
+
#define exp_unary(x, z) *z = exp(*x)
#define log_unary(x, z) *z = log(*x)
#define log10_unary(x, z) *z = log10(*x)
@@ -365,6 +381,8 @@
@:unop(_COSH,cosh)@
@:unop(_SINH,sinh)@
@:unop(_TANH,tanh)@
+@:unop(_RADIANS,radians)@
+@:unop(_DEGREES,degrees)@
@:unop(_EXP,exp)@
@:unop(_LOG,log)@
@@ -564,6 +582,8 @@
@:unopM5(_SIN,sin)@
@:unopM5(_TAN,tan)@
@:unopM5(_COT,cot)@
+@:unopM5(_RADIANS,radians)@
+@:unopM5(_DEGREES,degrees)@
@:unopM5(_COSH,cosh)@
@:unopM5(_SINH,sinh)@
diff -r 0d3117e0b5ef -r 4a03dc172739 MonetDB5/src/optimizer/opt_tarantula.mx
--- a/MonetDB5/src/optimizer/opt_tarantula.mx Tue Nov 16 16:16:10 2010 +0100
+++ b/MonetDB5/src/optimizer/opt_tarantula.mx Wed Nov 17 11:29:57 2010 +0100
@@ -933,7 +933,7 @@
OPTtarantulaImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci)
{
InstrPtr q, p, pp, *old;
- int last=0, i, j, k, l, limit, actions=0, block = 0, fnd;
+ int last=0, i, j, k, l, limit, actions=0, block = 0, fnd, target;
int leg=0, ta =0, vtop=0;
MalBlkPtr tm;
char fcn[BUFSIZ];
@@ -1012,6 +1012,13 @@
for ( i = 0; i < VTOP * vtop; i++)
map[i] = i;
+ /* find the last mat.pack instruction */
+ target=0;
+ for (i = limit-1; i > 0; i--)
+ if( getModuleId(old[i])== matRef && getFunctionId(old[i])== packRef) {
+ target = i;
+ break;
+ }
for (i = 1; i < limit; i++) {
p = old[i];
if ( p == 0)
@@ -1021,7 +1028,7 @@
old[i]= 0;
continue;
}
- if( getModuleId(p)== matRef && getFunctionId(p)== packRef) {
+ if( i == target) {
@-
The critical part is to determine the input/output variable set
for this pack function. Some variables may have to be re-used
diff -r 0d3117e0b5ef -r 4a03dc172739 sql/src/test/LSST/Tests/All
--- a/sql/src/test/LSST/Tests/All Tue Nov 16 16:16:10 2010 +0100
+++ b/sql/src/test/LSST/Tests/All Wed Nov 17 11:29:57 2010 +0100
@@ -1,4 +1,5 @@
schema_3_1_88
+functions
#dbQuery000
#dbQuery001
#dbQuery002
diff -r 0d3117e0b5ef -r 4a03dc172739 sql/src/test/LSST/Tests/dbQuery007.sql
--- a/sql/src/test/LSST/Tests/dbQuery007.sql Tue Nov 16 16:16:10 2010 +0100
+++ b/sql/src/test/LSST/Tests/dbQuery007.sql Wed Nov 17 11:29:57 2010 +0100
@@ -1,8 +1,11 @@
-- http://dev.lsstcorp.org/trac/wiki/dbQuery007
+-- variables need to be fixed
+-- (:raMin, :declMin, :raMax, :declMax)= (1,2,3,4)
+-- (:varMin AND :varMax) (5,6)
SELECT *
FROM Source_pt1
JOIN Filter USING(filterId)
-WHERE areaSpec_box(raMin, :declMin, :raMax, :declMax)
+WHERE areaSpec_box(1,2,3,4)
AND filterName = 'u'
- AND variability BETWEEN :varMin AND :varMax
-ORDER BY objectId, taiObs ASC;
+ -- AND variability BETWEEN 5 AND 6 UNKNOWN attribute
+ORDER BY objectId, taiMidPoint ASC;
diff -r 0d3117e0b5ef -r 4a03dc172739
sql/src/test/LSST/Tests/dbQuery007.stable.err
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/LSST/Tests/dbQuery007.stable.err Wed Nov 17 11:29:57
2010 +0100
@@ -0,0 +1,81 @@
+stderr of test 'dbQuery007` in directory 'src/test/LSST` itself:
+
+
+# 23:21:21 >
+# 23:21:21 > mserver5 "--config=/ufs/mk/current//Linux/etc/monetdb5.conf"
--debug=10 --set gdk_nr_threads=0 --set
"monet_mod_path=/ufs/mk/current//Linux/lib/MonetDB5:/ufs/mk/current//Linux/lib/MonetDB5/lib:/ufs/mk/current//Linux/lib/MonetDB5/bin"
--set "gdk_dbfarm=/ufs/mk/current//Linux/var/MonetDB5/dbfarm" --set
mapi_open=true --set xrpc_open=true --set mapi_port=37337 --set xrpc_port=42369
--set monet_prompt= --trace --forcemito --set mal_listing=2
"--dbname=mTests_src_test_LSST" --set mal_listing=0 ; echo ; echo Over..
+# 23:21:21 >
+
+# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu
+# builtin opt gdk_version = 1.41.0
+# builtin opt prefix = /ufs/mk/current//Linux
+# builtin opt exec_prefix = ${prefix}
+# builtin opt gdk_dbname = demo
+# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB/dbfarm
+# builtin opt gdk_debug = 0
+# builtin opt gdk_alloc_map = no
+# builtin opt gdk_vmtrim = yes
+# builtin opt monet_admin = adm
+# builtin opt monet_prompt = >
+# builtin opt monet_welcome = yes
+# builtin opt monet_mod_path = ${exec_prefix}/lib/MonetDB
+# builtin opt monet_daemon = no
+# builtin opt host = localhost
+# builtin opt mapi_port = 50000
+# builtin opt mapi_clients = 2
+# builtin opt mapi_open = false
+# builtin opt mapi_autosense = false
+# builtin opt default_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# builtin opt minimal_pipe = inline,remap,deadcode,multiplex,garbageCollector
+# builtin opt sql_optimizer = default_pipe
+# builtin opt sql_debug = 0
+# builtin opt standoff_ns =
+# builtin opt standoff_start = start
+# builtin opt standoff_end = end
+# config opt prefix = /ufs/mk/current//Linux
+# config opt config = ${prefix}/etc/monetdb5.conf
+# config opt prefix = /ufs/mk/current//Linux
+# config opt exec_prefix = ${prefix}
+# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm
+# config opt monet_mod_path =
${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin
+# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid
+# config opt mero_controlport = 50001
+# config opt no_mitosis_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt sequential_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,history,multiplex,garbageCollector
+# config opt nov2009_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt replication_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,replication,multiplex,garbageCollector
+# config opt accumulator_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,accumulators,dataflow,history,multiplex,garbageCollector
+# config opt recycler_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,deadcode,recycle,reduce,dataflow,history,multiplex,garbageCollector
+# config opt cracker_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,selcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt sidcrack_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,sidcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt datacell_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,datacell,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt octopus_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,octopus,reduce,dataflow,history,multiplex,garbageCollector
+# config opt tarantula_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,constants,commonTerms,joinPath,tarantula,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt mapreduce_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mapreduce,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt datacyclotron_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,datacyclotron,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,history,replication,multiplex,garbageCollector
+# config opt derive_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,derivePath,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt dictionary_pipe =
inline,remap,dictionary,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt compression_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,compression,dataflow,history,multiplex,garbageCollector
+# cmdline opt config = /ufs/mk/current//Linux/etc/monetdb5.conf
+# cmdline opt gdk_nr_threads = 0
+# cmdline opt monet_mod_path =
/ufs/mk/current//Linux/lib/MonetDB5:/ufs/mk/current//Linux/lib/MonetDB5/lib:/ufs/mk/current//Linux/lib/MonetDB5/bin
+# cmdline opt gdk_dbfarm = /ufs/mk/current//Linux/var/MonetDB5/dbfarm
+# cmdline opt mapi_open = true
+# cmdline opt xrpc_open = true
+# cmdline opt mapi_port = 37337
+# cmdline opt xrpc_port = 42369
+# cmdline opt monet_prompt =
+# cmdline opt mal_listing = 2
+# cmdline opt gdk_dbname = mTests_src_test_LSST
+# cmdline opt mal_listing = 0
+#warning: please don't forget to set your vault key!
+#(see /ufs/mk/current//Linux/etc/monetdb5.conf)
+
+# 23:21:21 >
+# 23:21:21 > mclient -lsql -ftest -i -e --host=eir --port=37337
+# 23:21:21 >
+
+
+# 23:21:21 >
+# 23:21:21 > Done.
+# 23:21:21 >
+
diff -r 0d3117e0b5ef -r 4a03dc172739
sql/src/test/LSST/Tests/dbQuery007.stable.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/LSST/Tests/dbQuery007.stable.out Wed Nov 17 11:29:57
2010 +0100
@@ -0,0 +1,43 @@
+stdout of test 'dbQuery007` in directory 'src/test/LSST` itself:
+
+
+# 23:21:21 >
+# 23:21:21 > mserver5 "--config=/ufs/mk/current//Linux/etc/monetdb5.conf"
--debug=10 --set gdk_nr_threads=0 --set
"monet_mod_path=/ufs/mk/current//Linux/lib/MonetDB5:/ufs/mk/current//Linux/lib/MonetDB5/lib:/ufs/mk/current//Linux/lib/MonetDB5/bin"
--set "gdk_dbfarm=/ufs/mk/current//Linux/var/MonetDB5/dbfarm" --set
mapi_open=true --set xrpc_open=true --set mapi_port=37337 --set xrpc_port=42369
--set monet_prompt= --trace --forcemito --set mal_listing=2
"--dbname=mTests_src_test_LSST" --set mal_listing=0 ; echo ; echo Over..
+# 23:21:21 >
+
+# MonetDB server v5.23.0, based on kernel v1.41.0
+# Not released
+# Serving database 'mTests_src_test_LSST', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically
linked
+# Found 7.750 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
+# Visit http://monetdb.cwi.nl/ for further information
+# Listening for connection requests on mapi:monetdb://eir.ins.cwi.nl:37337/
+# MonetDB/SQL module v2.41.0 loaded
+# MonetDB/GIS module v0.21.0 loaded
+
+Ready.
+
+Over..
+
+# 10:52:17 >
+# 10:52:17 > mclient -lsql -ftest -i -e --host=eir --port=36243
+# 10:52:17 >
+
+#SELECT *
+#FROM Source_pt1
+#JOIN Filter USING(filterId)
+#WHERE areaSpec_box(1,2,3,4)
+# AND filterName = 'u'
+# -- AND variability BETWEEN 5 AND 6 UNKNOWN attribute
+#ORDER BY objectId, taiMidPoint ASC;
+% sys.L1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys
.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1, sys.source_pt1,
sys.filter, sys.filter, sys.filter # table_name
+% filterid, sourceid, ampexposureid, objectid, movingobjectid,
prochistoryid, ra, raerrfordetection, raerrforwcs, decl,
declerrfordetection, declerrforwcs, xflux, xfluxerr, yflux,
yfluxerr, raflux, rafluxerr, declflux, declfluxerr, xpeak,
ypeak, rapeak, declpeak, xastrom, xastromerr, yastrom,
yastromerr, raastrom, raastromerr, declastrom, declastromerr,
raobject, declobject, taimidpoint, tairange, psfflux,
psffluxerr, apflux, apfluxerr, modelflux, modelfluxerr,
petroflux, petrofluxerr, instflux, instfluxerr,
nongraycorrflux, nongraycorrfluxerr, atmcorrflux, atmcorrfluxerr,
apdia, ixx, ixxerr, iyy, iyyerr, ixy, ixyerr, snr, chi2, sky,
skyerr, extendedness, flux_ps, flux_ps_sigma, flux_sg,
flux_sg_sigma, sersicn_sg, sersicn_sg_sigma, e1_sg, e1_sg_sigma,
e2_sg, e2_sg_sigma, radius_sg, radius_sg_sigma,
flux_flux_sg_cov, flux_e1_sg_cov, flux_e2_sg_cov, flux_radius_sg_cov,
flux_sersicn_sg_cov, e1_e1_sg_cov, e1_e2_sg_cov, e1_radius_sg_cov,
e1_sersicn_sg_cov, e2_e2_sg_cov, e2_radius
_sg_cov, e2_sersicn_sg_cov, radius_radius_sg_cov,
radius_sersicn_sg_cov, sersicn_sersicn_sg_cov, flagforassociation,
flagfordetection, flagforwcs, filtername, photclam, photbw
# name
+% tinyint, bigint, bigint, bigint, bigint, int, double, double, double,
double, double, double, double, double, double, double, double, double, double,
double, double, double, double, double, double, double, double, double, double,
double, double, double, double, double, double, double, double, double, double,
double, double, double, double, double, double, double, double, double, double,
double, double, double, double, double, double, double, double, double, double,
double, double, double, double, double, double, double, double, double, double,
double, double, double, double, double, double, double, double, double, double,
double, double, double, double, double, double, double, double, double, double,
smallint, int, smallint, char, double, double # type
+% 1, 1, 1, 1, 1, 1, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 1,
1, 1, 255, 22, 22 # length
+
+# 10:52:17 >
+# 10:52:17 > Done.
+# 10:52:17 >
+
diff -r 0d3117e0b5ef -r 4a03dc172739 sql/src/test/LSST/Tests/dbQuery009.sql
--- a/sql/src/test/LSST/Tests/dbQuery009.sql Tue Nov 16 16:16:10 2010 +0100
+++ b/sql/src/test/LSST/Tests/dbQuery009.sql Wed Nov 17 11:29:57 2010 +0100
@@ -1,4 +1,5 @@
-- http://dev.lsstcorp.org/trac/wiki/dbQuery009
+-- pick :objectId = 123
SELECT *
FROM Object
-WHERE objectId = :objectId;
+WHERE objectId = 123;
diff -r 0d3117e0b5ef -r 4a03dc172739
sql/src/test/LSST/Tests/dbQuery009.stable.err
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/LSST/Tests/dbQuery009.stable.err Wed Nov 17 11:29:57
2010 +0100
@@ -0,0 +1,81 @@
+stderr of test 'dbQuery009` in directory 'src/test/LSST` itself:
+
+
+# 09:59:32 >
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list