Changeset: 652508dad2c6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=652508dad2c6
Added Files:
gdk/gdk_project.c
monetdb5/modules/mal/projectionpath.c
monetdb5/modules/mal/projectionpath.h
monetdb5/optimizer/Tests/projectionchain.malC
monetdb5/optimizer/Tests/projectionchain.stable.err
monetdb5/optimizer/Tests/projectionchain.stable.out
monetdb5/optimizer/opt_projectionpath.c
monetdb5/optimizer/opt_projectionpath.h
sql/test/rdf/Tests/q8_v_small.reqtests
sql/test/rdf/Tests/q8_v_small.sql
sql/test/rdf/Tests/q8_v_small.stable.err
sql/test/rdf/Tests/q8_v_small.stable.out
Removed Files:
monetdb5/modules/mal/joinpath.c
monetdb5/modules/mal/joinpath.h
monetdb5/optimizer/Tests/joinchain.malC
monetdb5/optimizer/Tests/joinchain.stable.err
monetdb5/optimizer/Tests/joinchain.stable.out
monetdb5/optimizer/opt_joinpath.c
monetdb5/optimizer/opt_joinpath.h
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.err
clients/Tests/exports.stable.out
clients/Tests/malcheck.stable.err
common/stream/stream.c
gdk/Makefile.ag
gdk/gdk_join.c
gdk/gdk_search.c
gdk/gdk_search.h
monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.err
monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.single
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_profiler.h
monetdb5/modules/mal/Makefile.ag
monetdb5/modules/mal/profiler.c
monetdb5/modules/mal/profiler.h
monetdb5/modules/mal/profiler.mal
monetdb5/optimizer/Makefile.ag
monetdb5/optimizer/Tests/All
monetdb5/optimizer/Tests/JPexample.malC
monetdb5/optimizer/Tests/JPexample.stable.out
monetdb5/optimizer/Tests/dataflow3.malC
monetdb5/optimizer/Tests/joinpath.malC
monetdb5/optimizer/Tests/leftjoinpath.malC
monetdb5/optimizer/Tests/tst4005.malC
monetdb5/optimizer/Tests/tst4630.malC
monetdb5/optimizer/opt_costModel.c
monetdb5/optimizer/opt_pipes.c
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_profiler.c
monetdb5/optimizer/opt_support.c
monetdb5/optimizer/opt_support.h
monetdb5/optimizer/opt_wrapper.c
monetdb5/optimizer/optimizer.mal
sql/backends/monet5/Tests/optimizers.sql
sql/backends/monet5/Tests/optimizers.stable.err
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql_scenario.c
sql/benchmarks/ssbm/Tests/04-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/05-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/06-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/07-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/08-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/09-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/10-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/11-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/12-explain.stable.out
sql/benchmarks/ssbm/Tests/12-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/13-explain.stable.out.int128
sql/benchmarks/tpch/Tests/02-explain.stable.out
sql/benchmarks/tpch/Tests/03-explain.stable.out.int128
sql/benchmarks/tpch/Tests/04-explain.stable.out
sql/benchmarks/tpch/Tests/05-explain.stable.out.int128
sql/benchmarks/tpch/Tests/07-explain.stable.out
sql/benchmarks/tpch/Tests/07-explain.stable.out.int128
sql/benchmarks/tpch/Tests/08-explain.stable.out.int128
sql/benchmarks/tpch/Tests/08-plan.stable.out
sql/benchmarks/tpch/Tests/08-plan.stable.out.int128
sql/benchmarks/tpch/Tests/09-explain.stable.out.int128
sql/benchmarks/tpch/Tests/10-explain.stable.out.int128
sql/benchmarks/tpch/Tests/11-explain.stable.out.int128
sql/benchmarks/tpch/Tests/13-explain.stable.out
sql/benchmarks/tpch/Tests/13-explain.stable.out.32bit
sql/benchmarks/tpch/Tests/15-explain.stable.out.int128
sql/benchmarks/tpch/Tests/16-explain.stable.out
sql/benchmarks/tpch/Tests/17-explain.stable.out.int128
sql/benchmarks/tpch/Tests/18-explain.stable.out.int128
sql/benchmarks/tpch/Tests/19-explain.stable.out
sql/benchmarks/tpch/Tests/19-explain.stable.out.int128
sql/benchmarks/tpch/Tests/20-explain.stable.out.int128
sql/benchmarks/tpch/Tests/21-explain.stable.out
sql/benchmarks/tpch/Tests/21-explain.stable.out.32bit
sql/benchmarks/tpch/Tests/22-explain.stable.out
sql/benchmarks/tpch/Tests/22-explain.stable.out.32bit
sql/benchmarks/tpch/Tests/22-explain.stable.out.int128
sql/jdbc/tests/Tests/Test_Dobjects.stable.out
sql/jdbc/tests/Tests/Test_PSmetadata.stable.out
sql/jdbc/tests/Tests/Test_Rmetadata.stable.out
sql/jdbc/tests/Tests/Test_Rsqldata.stable.out
sql/server/rel_optimizer.c
sql/server/sql_parser.y
sql/test/BugTracker-2009/Tests/reorder.SF-2770608.sql
sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.sql
sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out
sql/test/Tests/setoptimizer.stable.err
sql/test/Tests/setoptimizer.stable.out
sql/test/Tests/setoptimizer.stable.out.Windows
sql/test/rdf/Tests/All
testing/Makefile.ag
tools/merovingian/daemon/Makefile.ag
tools/mserver/Makefile.ag
Branch: rdf
Log Message:
Merge with default branch + fix issue in rel_bin
diffs (truncated from 6378 to 300 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -1989,8 +1989,8 @@ command algebra.not_like(s:str,pat:str):
address PCREnotlike2;
command algebra.not_like(s:str,pat:str,esc:str):bit
address PCREnotlike3;
-pattern algebra.projectionPath(l:bat[:any]...):bat[:any]
-address ALGjoinPath;
+pattern algebra.projectionpath(l:bat[:any]...):bat[:any]
+address ALGprojectionpath;
comment Routine to handle join paths. The type analysis is rather tricky.
command algebra.projection(left:bat[:oid],right:bat[:any_3]):bat[:any_3]
@@ -2005,10 +2005,6 @@ command algebra.reuse(b:bat[:any_1]):bat
address ALGreuse;
comment Reuse a temporary BAT if you can. Otherwise, allocate enough storage
to accept result of an operation (not involving the heap)
-pattern algebra.semijoinPath(l:bat[:any]...):bat[:any]
-address ALGjoinPath;
-comment Routine to handle join paths. The type analysis is rather tricky.
-
command algebra.subslice(b:bat[:any_1],x:wrd,y:wrd):bat[:oid]
address ALGsubslice_wrd;
comment Return the oids of the slice with the BUNs at position x till y.
@@ -39524,12 +39520,6 @@ comment Replace select with join select
pattern optimizer.joinselect():str
address OPTwrapper;
-pattern optimizer.joinPath(mod:str,fcn:str):str
-address OPTwrapper;
-comment Join path constructor
-
-pattern optimizer.joinPath():str
-address OPTwrapper;
pattern optimizer.matpack(mod:str,fcn:str):str
address OPTwrapper;
comment Unroll the mat.pack operation
@@ -39600,6 +39590,12 @@ comment Experiment with partitioned data
pattern optimizer.partitions():str
address OPTwrapper;
+pattern optimizer.projectionpath(mod:str,fcn:str):str
+address OPTwrapper;
+comment Join path constructor
+
+pattern optimizer.projectionpath():str
+address OPTwrapper;
pattern optimizer.prelude():void
address optimizer_prelude;
comment Initialize the optimizer
@@ -39760,6 +39756,14 @@ command profiler.setheartbeat(b:int):voi
address CMDsetHeartbeat;
comment Set heart beat performance tracing
+command profiler.stoptrace():void
+address CMDstopTrace;
+comment Stop collecting trace information
+
+command profiler.starttrace():void
+address CMDstartTrace;
+comment Start collecting trace information
+
pattern profiler.stop():void
address CMDstopProfiler;
comment Stop offline performance profiling
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -2428,8 +2428,8 @@ command algebra.not_like(s:str,pat:str):
address PCREnotlike2;
command algebra.not_like(s:str,pat:str,esc:str):bit
address PCREnotlike3;
-pattern algebra.projectionPath(l:bat[:any]...):bat[:any]
-address ALGjoinPath;
+pattern algebra.projectionpath(l:bat[:any]...):bat[:any]
+address ALGprojectionpath;
comment Routine to handle join paths. The type analysis is rather tricky.
command algebra.projection(left:bat[:oid],right:bat[:any_3]):bat[:any_3]
@@ -2444,10 +2444,6 @@ command algebra.reuse(b:bat[:any_1]):bat
address ALGreuse;
comment Reuse a temporary BAT if you can. Otherwise, allocate enough storage
to accept result of an operation (not involving the heap)
-pattern algebra.semijoinPath(l:bat[:any]...):bat[:any]
-address ALGjoinPath;
-comment Routine to handle join paths. The type analysis is rather tricky.
-
command algebra.subslice(b:bat[:any_1],x:wrd,y:wrd):bat[:oid]
address ALGsubslice_wrd;
comment Return the oids of the slice with the BUNs at position x till y.
@@ -50383,12 +50379,6 @@ comment Replace select with join select
pattern optimizer.joinselect():str
address OPTwrapper;
-pattern optimizer.joinPath(mod:str,fcn:str):str
-address OPTwrapper;
-comment Join path constructor
-
-pattern optimizer.joinPath():str
-address OPTwrapper;
pattern optimizer.matpack(mod:str,fcn:str):str
address OPTwrapper;
comment Unroll the mat.pack operation
@@ -50459,6 +50449,12 @@ comment Experiment with partitioned data
pattern optimizer.partitions():str
address OPTwrapper;
+pattern optimizer.projectionpath(mod:str,fcn:str):str
+address OPTwrapper;
+comment Join path constructor
+
+pattern optimizer.projectionpath():str
+address OPTwrapper;
pattern optimizer.prelude():void
address optimizer_prelude;
comment Initialize the optimizer
@@ -50619,6 +50615,14 @@ command profiler.setheartbeat(b:int):voi
address CMDsetHeartbeat;
comment Set heart beat performance tracing
+command profiler.stoptrace():void
+address CMDstopTrace;
+comment Stop collecting trace information
+
+command profiler.starttrace():void
+address CMDstartTrace;
+comment Start collecting trace information
+
pattern profiler.stop():void
address CMDstopProfiler;
comment Stop offline performance profiling
diff --git a/clients/Tests/exports.stable.err b/clients/Tests/exports.stable.err
--- a/clients/Tests/exports.stable.err
+++ b/clients/Tests/exports.stable.err
@@ -6,7 +6,4 @@ stderr of test 'exports` in directory 'c
# 15:10:42 >
-# 15:11:17 >
-# 15:11:17 > "Done."
-# 15:11:17 >
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
@@ -1,9 +1,9 @@
stdout of test 'exports` in directory 'clients` itself:
-# 15:10:42 >
-# 15:10:42 > "/usr/bin/python" "exports.py" "exports"
-# 15:10:42 >
+# 21:40:57 >
+# 21:40:57 > "/usr/bin/python2" "exports.py" "exports"
+# 21:40:57 >
# gdk
void ALIGNsetH(BAT *b1, BAT *b2);
@@ -252,7 +252,7 @@ size_t GDKvm_cursize(void);
void *GDKzalloc(size_t size) __attribute__((__malloc__))
__attribute__((__warn_unused_result__));
void HASHdestroy(BAT *b);
BUN HASHlist(Hash *h, BUN i);
-BUN HASHprobe(Hash *h, const void *v);
+BUN HASHprobe(const Hash *h, const void *v);
void HEAP_free(Heap *heap, var_t block);
void HEAP_initialize(Heap *heap, size_t nbytes, size_t nprivate, int
alignment);
var_t HEAP_malloc(Heap *heap, size_t nbytes);
@@ -669,10 +669,10 @@ str ALGfetchoid(ptr ret, const bat *bid,
str ALGfind(oid *ret, const bat *bid, ptr val);
str ALGfirstn(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str ALGgroupby(bat *res, const bat *gids, const bat *cnts);
-str ALGjoinPath(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str ALGmaxany(ptr result, const bat *bid);
str ALGminany(ptr result, const bat *bid);
str ALGprojection(bat *result, const bat *lid, const bat *rid);
+str ALGprojectionpath(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str ALGprojecttail(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str ALGreuse(bat *ret, const bat *bid);
str ALGsample(bat *result, const bat *bid, const int *param);
@@ -1055,7 +1055,9 @@ str CMDscience_bat_flt_tanh(bat *ret, co
str CMDsetHeartbeat(void *res, int *ev);
str CMDsetoid(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDstartProfiler(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str CMDstartTrace(void *res);
str CMDstopProfiler(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str CMDstopTrace(void *res);
str CMDstr2qgrams(bat *ret, str *val);
str CMDstrlength(int *ret, str *v);
str CMDvarABS(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
@@ -1516,7 +1518,6 @@ int OPTgarbageCollectorImplementation(Cl
int OPTgeneratorImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
int OPTinlineImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p);
int OPTisAlias(InstrPtr p);
-int OPTjoinPathImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p);
int OPTjsonImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci);
str OPTmacro(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
int OPTmacroImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
p);
@@ -1529,6 +1530,7 @@ str OPTmultiplexSimple(Client cntxt, Mal
str OPTorcam(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
int OPTorcamImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
p);
int OPTprofilerImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p);
+int OPTprojectionpathImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p);
int OPTpushselectImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
int OPTquerylogImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
int OPTrecyclerImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p);
@@ -2167,7 +2169,6 @@ int isUnsafeFunction(InstrPtr q);
int isUnsafeInstruction(InstrPtr q);
int isUpdateInstruction(InstrPtr p);
str iteratorRef;
-str joinPathRef;
str jsonRef;
str languageRef;
str levenshtein_impl(int *result, str *s, str *t, int *insdel_cost, int
*replace_cost, int *transpose_cost);
@@ -2338,8 +2339,8 @@ void profilerHeartbeatEvent(char *alter)
str profilerRef;
str projectRef;
str projectdeltaRef;
-str projectionPathRef;
str projectionRef;
+str projectionpathRef;
void promptInstruction(stream *fd, MalBlkPtr mb, MalStkPtr stk, InstrPtr p,
int flg);
InstrPtr pushArgument(MalBlkPtr mb, InstrPtr p, int varid);
InstrPtr pushArgumentId(MalBlkPtr mb, InstrPtr p, str name);
@@ -2456,8 +2457,12 @@ int sqlblob_tostr(str *tostr, int *l, co
str srvpoolRef;
str startProfiler(void);
str startRef;
+str startTrace(void);
+str starttraceRef;
str stopProfiler(void);
str stopRef;
+str stopTrace(void);
+str stoptraceRef;
void strAfterCall(ValPtr v, ValPtr bak);
void strBeforeCall(ValPtr v, ValPtr bak);
str strEpilogue(void *ret);
@@ -2600,7 +2605,7 @@ stream *udp_wastream(const char *hostnam
stream *wbstream(stream *s, size_t buflen);
-# 15:25:25 >
-# 15:25:25 > "Done."
-# 15:25:25 >
+# 21:41:06 >
+# 21:41:06 > "Done."
+# 21:41:06 >
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -301,15 +301,17 @@ cvfilename(const char *filename)
size_t len = strlen(filename);
size_t size = 4 * len;
ICONV_CONST char *from = (ICONV_CONST char *) filename;
- char *r = malloc(size);
+ char *r = malloc(size + 1);
char *p = r;
- if (r &&
- iconv(cd, &from, &len, &p, &size) != (size_t) -1) {
- iconv_close(cd);
- return r;
- } else if (r)
+ if (r) {
+ if (iconv(cd, &from, &len, &p, &size) !=
(size_t) -1) {
+ iconv_close(cd);
+ *p = 0;
+ return r;
+ }
free(r);
+ }
iconv_close(cd);
}
}
diff --git a/gdk/Makefile.ag b/gdk/Makefile.ag
--- a/gdk/Makefile.ag
+++ b/gdk/Makefile.ag
@@ -27,7 +27,7 @@ lib_gdk = {
gdk_calc.c gdk_calc.h gdk_calc_compare.h gdk_calc_private.h \
gdk_aggr.c gdk_group.c \
gdk_imprints.c gdk_imprints.h \
- gdk_join.c \
+ gdk_join.c gdk_project.c \
gdk_unique.c \
gdk_firstn.c \
bat.feps bat1.feps bat2.feps \
diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -12,12 +12,12 @@
#include "gdk_calc_private.h"
/*
- * All "sub" join variants produce some sort of join on two input
- * BATs, optionally subject to up to two candidate lists. Only values
- * in the input BATs that are mentioned in the associated candidate
- * list (if provided) are eligible. They all return two output BATs
- * in the first two arguments. The join operations differ in the way
- * in which tuples from the two inputs are matched.
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list