MonetDB: default - Shortcut in SORTfnd* for searching in dense c...
Changeset: b4c6c1b1e767 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b4c6c1b1e767 Modified Files: gdk/gdk_search.c Branch: default Log Message: Shortcut in SORTfnd* for searching in dense column. diffs (22 lines): diff --git a/gdk/gdk_search.c b/gdk/gdk_search.c --- a/gdk/gdk_search.c +++ b/gdk/gdk_search.c @@ -459,6 +459,18 @@ SORTfndwhich(BAT *b, const void *v, int if (b == NULL || (!b-tsorted !b-trevsorted)) return BUN_NONE; + if (BATtdense(b)) { + /* no need for binary search on dense column */ + if (* (const oid *) v b-tseqbase) + return which == 0 ? BUN_NONE : lo; + if (* (const oid *) v = b-tseqbase + BATcount(b)) + return which == 0 ? BUN_NONE : hi; + cur = (BUN) (* (const oid *) v - b-tseqbase) + lo; + if (which 0) + cur++; + return cur; + } + if (which 0) { end = lo; if (lo = hi || (b-tsorted ? atom_GE(BUNtail(bi, lo), v, b-ttype) : atom_LE(BUNtail(bi, lo), v, b-ttype))) { ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Prevent a race condition from happening by co...
Changeset: 3de0b693aaee for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3de0b693aaee Modified Files: monetdb5/mal/mal_profiler.c monetdb5/modules/mal/profiler.c sql/backends/monet5/sql.mx sql/test/Tests/trace.stable.out Branch: default Log Message: Prevent a race condition from happening by copying trace bats. In e.g. the mat.slice_limit1.Bug-2645 test, trace information is retrieved and then used in SQL queries. This could lead to a race condition, since the trace information was returned as references to the actual bats which were then used in e.g. a join. The join happened to create a temporary view on the bat which caused the share count of the trace bat to be 1 temporarily. In the mean time, in another thread, MAL instructions were being executed. Whenever an instruction executes, an entry is added to the trace bat. This means writing to the bat, which is only allowed if, among other tests, the share count is 0. If the bat append happens just as the view exists, the append fails with an error. The solution is to not return references to the trace bats, but to return copies instead. diffs (112 lines): diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c --- a/monetdb5/mal/mal_profiler.c +++ b/monetdb5/mal/mal_profiler.c @@ -780,18 +780,18 @@ TRACEtable(BAT **r) if (initTrace()) return ; mal_set_lock(mal_profileLock, profileLock); - r[0] = TRACE_id_event; - r[1] = TRACE_id_time; - r[2] = TRACE_id_pc; - r[3] = TRACE_id_thread; - r[4] = TRACE_id_user; - r[5] = TRACE_id_ticks; - r[6] = TRACE_id_reads; - r[7] = TRACE_id_writes; - r[8] = TRACE_id_rbytes; - r[9] = TRACE_id_wbytes; - r[10] = TRACE_id_type; - r[11] = TRACE_id_stmt; + r[0] = BATcopy(TRACE_id_event, TRACE_id_event-htype, TRACE_id_event-ttype, 0); + r[1] = BATcopy(TRACE_id_time, TRACE_id_time-htype, TRACE_id_time-ttype, 0); + r[2] = BATcopy(TRACE_id_pc, TRACE_id_pc-htype, TRACE_id_pc-ttype, 0); + r[3] = BATcopy(TRACE_id_thread, TRACE_id_thread-htype, TRACE_id_thread-ttype, 0); + r[4] = BATcopy(TRACE_id_user, TRACE_id_user-htype, TRACE_id_user-ttype, 0); + r[5] = BATcopy(TRACE_id_ticks, TRACE_id_ticks-htype, TRACE_id_ticks-ttype, 0); + r[6] = BATcopy(TRACE_id_reads, TRACE_id_reads-htype, TRACE_id_reads-ttype, 0); + r[7] = BATcopy(TRACE_id_writes, TRACE_id_writes-htype, TRACE_id_writes-ttype, 0); + r[8] = BATcopy(TRACE_id_rbytes, TRACE_id_rbytes-htype, TRACE_id_rbytes-ttype, 0); + r[9] = BATcopy(TRACE_id_wbytes, TRACE_id_wbytes-htype, TRACE_id_wbytes-ttype, 0); + r[10] = BATcopy(TRACE_id_type, TRACE_id_type-htype, TRACE_id_type-ttype, 0); + r[11] = BATcopy(TRACE_id_stmt, TRACE_id_stmt-htype, TRACE_id_stmt-ttype, 0); mal_unset_lock(mal_profileLock, profileLock); } @@ -925,29 +925,29 @@ getTrace(str nme) if (TRACE_init == 0) return NULL; if (strcmp(nme, event) == 0) - return TRACE_id_event; + return BATcopy(TRACE_id_event, TRACE_id_event-htype, TRACE_id_event-ttype, 0); if (strcmp(nme, time) == 0) - return TRACE_id_time; + return BATcopy(TRACE_id_time, TRACE_id_time-htype, TRACE_id_time-ttype, 0); if (strcmp(nme, ticks) == 0) - return TRACE_id_ticks; + return BATcopy(TRACE_id_ticks, TRACE_id_ticks-htype, TRACE_id_ticks-ttype, 0); if (strcmp(nme, pc) == 0) - return TRACE_id_pc; + return BATcopy(TRACE_id_pc, TRACE_id_pc-htype, TRACE_id_pc-ttype, 0); if (strcmp(nme, thread) == 0) - return TRACE_id_thread; + return BATcopy(TRACE_id_thread, TRACE_id_thread-htype, TRACE_id_thread-ttype, 0); if (strcmp(nme, user) == 0) - return TRACE_id_user; + return BATcopy(TRACE_id_user, TRACE_id_user-htype, TRACE_id_user-ttype, 0); if (strcmp(nme, stmt) == 0) - return TRACE_id_stmt; + return BATcopy(TRACE_id_stmt, TRACE_id_stmt-htype, TRACE_id_stmt-ttype, 0); if (strcmp(nme, type) == 0) - return TRACE_id_type; + return BATcopy(TRACE_id_type, TRACE_id_type-htype, TRACE_id_type-ttype, 0); if (strcmp(nme, rbytes) == 0) - return TRACE_id_rbytes; + return BATcopy(TRACE_id_rbytes, TRACE_id_rbytes-htype, TRACE_id_rbytes-ttype, 0); if (strcmp(nme, wbytes) == 0) - return TRACE_id_wbytes; + return BATcopy(TRACE_id_wbytes, TRACE_id_wbytes-htype, TRACE_id_wbytes-ttype, 0); if (strcmp(nme, reads) == 0) - return TRACE_id_reads; + return BATcopy(TRACE_id_reads, TRACE_id_reads-htype, TRACE_id_reads-ttype, 0); if (strcmp(nme, writes) == 0) - return TRACE_id_writes;
MonetDB: default - Comment and whitespace changes.
Changeset: f7053323c597 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f7053323c597 Modified Files: monetdb5/extras/mal_optimizer_template/opt_sql_append.c Branch: default Log Message: Comment and whitespace changes. diffs (117 lines): diff --git a/monetdb5/extras/mal_optimizer_template/opt_sql_append.c b/monetdb5/extras/mal_optimizer_template/opt_sql_append.c --- a/monetdb5/extras/mal_optimizer_template/opt_sql_append.c +++ b/monetdb5/extras/mal_optimizer_template/opt_sql_append.c @@ -3,14 +3,14 @@ * Version 1.1 (the License); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.monetdb.org/Legal/MonetDBLicense - * + * * Software distributed under the License is distributed on an AS IS * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. - * + * * The Original Code is the MonetDB Database System. - * + * * The Initial Developer of the Original Code is CWI. * Portions created by CWI are Copyright (C) 1997-July 2008 CWI. * Copyright August 2008-2012 MonetDB B.V. @@ -51,7 +51,8 @@ * * i.e., handing a BAT view v2 of BAT v0 as argument to the sql.append() * statement, rather than the original BAT v0. - * My advice, always use new variable names, it may capture some easy to make errors. + * My advice, always use new variable names, it may capture some easy + * to make errors. * * As a refinement, patterns like * @@ -77,7 +78,7 @@ /* * It is mandatory to make optimizers part of the 'optimizer' module. * This allows the optimizer implementation to find them and react on them. -*/ + */ #include monetdb_config.h #include opt_sql_append.h #include mal_interpreter.h @@ -164,9 +165,11 @@ OPTsql_appendImplementation(Client cntxt /* look for * v5 := ... v0 ...; */ - /* an expensive loop, better would be to remember that v0 has a different role. -* A typical method is to keep a map from variable - instruction where it was -* detected. Then you can check each assignment for use of v0 + /* an expensive loop, better would be to remember that v0 +* has a different role. A typical method is to keep a +* map from variable - instruction where it was +* detected. Then you can check each assignment for use of +* v0 */ for (j = i+1; !found j limit; j++) for (k = old[j]-retc; !found k old[j]-argc; k++) @@ -182,8 +185,11 @@ OPTsql_appendImplementation(Client cntxt /* push new v1 := aggr.count( v0 ); unless already available */ if (q1 == NULL) { - /* use mal_builder.h primitives q1 = newStmt(mb, aggrRef,countRef); setArgType(mb,q1,TYPE_wrd) */ - /* it will be added to the block and even my re-use MAL instructions */ + /* use mal_builder.h primitives +* q1 = newStmt(mb, aggrRef,countRef); +* setArgType(mb,q1,TYPE_wrd) */ + /* it will be added to the block and even my +* re-use MAL instructions */ q1 = newInstruction(mb,ASSIGNsymbol); getArg(q1,0) = newTmpVariable(mb, TYPE_wrd); setModuleId(q1, aggrRef); @@ -193,7 +199,8 @@ OPTsql_appendImplementation(Client cntxt } /* push new v2 := algebra.slice( v0, 0, v1 ); */ - /* use mal_builder.h primitives q1 = newStmt(mb, algebraRef,sliceRef); */ + /* use mal_builder.h primitives +* q1 = newStmt(mb, algebraRef,sliceRef); */ q2 = newInstruction(mb,ASSIGNsymbol); getArg(q2,0) = newTmpVariable(mb, TYPE_any); setModuleId(q2, algebraRef); @@ -242,17 +249,17 @@ OPTsql_appendImplementation(Client cntxt */ /* Optimizer code wrapper -The optimizer wrapper code is the interface to the MAL optimizer calls. -It prepares the environment for the optimizers to do their work and removes -the call itself to avoid endless recursions. - -Before an optimizer is finished, it should leave a clean state behind. -Moreover, the information of the optimization step is saved for -debugging and analysis. -
MonetDB: default - fixing code test for new iterator semantics...
Changeset: cfa60eec970b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cfa60eec970b Modified Files: monetdb5/mal/Tests/tst1200.stable.out monetdb5/mal/Tests/tst1203.stable.out monetdb5/mal/Tests/tst1205.stable.out monetdb5/mal/Tests/tst901b.mal monetdb5/mal/Tests/tst901b.stable.out monetdb5/mal/Tests/tst902.mal monetdb5/mal/Tests/tst902.stable.out monetdb5/mal/Tests/tst903.stable.out monetdb5/mal/Tests/tst905.stable.out monetdb5/optimizer/opt_multiplex.c Branch: default Log Message: fixing code test for new iterator semantics; step 1: algebra.find() - algebra.fetch() Since BAT iterator now returns/uses (only) the phisycal position, and not the (logical) head value, we can no longer use algebra.find(), but have to use algebra.fetch(), instead. diffs (201 lines): diff --git a/monetdb5/mal/Tests/tst1200.stable.out b/monetdb5/mal/Tests/tst1200.stable.out --- a/monetdb5/mal/Tests/tst1200.stable.out +++ b/monetdb5/mal/Tests/tst1200.stable.out @@ -1159,7 +1159,7 @@ exit (X_1275,X_1276); # date_addyears.bat.setColumn(min100y), X_1283 := bat.new(nil:oid,nil:int); barrier (X_1287,X_1288) := iterator.new(date_addyears); -X_1290 := algebra.find(date_bat,X_1287); +X_1290 := algebra.fetch(date_bat,X_1287); X_1292 := mtime.diff(X_1288,X_1290); bat.insert(X_1283,X_1287,X_1292); redo (X_1287,X_1288) := iterator.next(date_addyears); @@ -1175,7 +1175,7 @@ exit (X_1287,X_1288); # date_addmonths.bat.setColumn(plus1m), X_1297 := bat.new(nil:oid,nil:int); barrier (X_1299,X_1300) := iterator.new(date_addmonths); -X_1302 := algebra.find(date_bat,X_1299); +X_1302 := algebra.fetch(date_bat,X_1299); X_1304 := mtime.diff(X_1300,X_1302); bat.insert(X_1297,X_1299,X_1304); redo (X_1299,X_1300) := iterator.next(date_addmonths); @@ -1384,8 +1384,8 @@ exit (X_1418,X_1419); # Skipped due to coercion implication X_1426 := bat.new(nil:oid,nil:timestamp); barrier (X_1429,X_1430) := iterator.new(date_bat); -X_1432 := algebra.find(daytime_bat,X_1429); -X_1434 := algebra.find(tzone_bat,X_1429); +X_1432 := algebra.fetch(daytime_bat,X_1429); +X_1434 := algebra.fetch(tzone_bat,X_1429); X_1436 := mtime.timestamp(X_1430,X_1432,X_1434); bat.insert(X_1426,X_1429,X_1436); redo (X_1429,X_1430) := iterator.next(date_bat); @@ -1402,7 +1402,7 @@ exit (X_1429,X_1430); #io.print(timestamp_bat.bat.setColumn(timestamp), X_1441 := bat.new(nil:oid,nil:date); barrier (X_1445,X_1446) := iterator.new(timestamp_bat); -X_1448 := algebra.find(tzone_bat,X_1445); +X_1448 := algebra.fetch(tzone_bat,X_1445); X_1450 := mtime.date(X_1446,X_1448); bat.insert(X_1441,X_1445,X_1450); redo (X_1445,X_1446) := iterator.next(timestamp_bat); @@ -1412,7 +1412,7 @@ exit (X_1445,X_1446); # [date](timestamp_bat,tzone_bat).bat.setColumn(date), X_1455 := bat.new(nil:oid,nil:daytime); barrier (X_1458,X_1459) := iterator.new(timestamp_bat); -X_1461 := algebra.find(tzone_bat,X_1458); +X_1461 := algebra.fetch(tzone_bat,X_1458); X_1463 := mtime.daytime(X_1459,X_1461); bat.insert(X_1455,X_1458,X_1463); redo (X_1458,X_1459) := iterator.next(timestamp_bat); @@ -1503,7 +1503,7 @@ exit (X_1525,X_1526); # timestamp_minus.bat.setColumn(min1), X_1533 := bat.new(nil:oid,nil:lng); barrier (X_1536,X_1537) := iterator.new(timestamp_plus); -X_1539 := algebra.find(timestamp_minus,X_1536); +X_1539 := algebra.fetch(timestamp_minus,X_1536); X_1541 := mtime.diff(X_1537,X_1539); bat.insert(X_1533,X_1536,X_1541); redo (X_1536,X_1537) := iterator.next(timestamp_plus); diff --git a/monetdb5/mal/Tests/tst1203.stable.out b/monetdb5/mal/Tests/tst1203.stable.out --- a/monetdb5/mal/Tests/tst1203.stable.out +++ b/monetdb5/mal/Tests/tst1203.stable.out @@ -513,7 +513,7 @@ exit (X_419,X_420); # date_addyears.bat.setColumn(min100y), X_427 := bat.new(nil:oid,nil:int); barrier (X_430,X_431) := iterator.new(date_addyears); -X_433 := algebra.find(date_bat,X_430); +X_433 := algebra.fetch(date_bat,X_430); X_435 := mtime.diff(X_431,X_433); bat.insert(X_427,X_430,X_435); redo (X_430,X_431) := iterator.next(date_addyears); @@ -529,7 +529,7 @@ exit (X_430,X_431); # date_addmonths.bat.setColumn(plus1m), X_440 := bat.new(nil:oid,nil:int); barrier (X_442,X_443) := iterator.new(date_addmonths); -X_445 := algebra.find(date_bat,X_442); +X_445 := algebra.fetch(date_bat,X_442); X_447 := mtime.diff(X_443,X_445); bat.insert(X_440,X_442,X_447); redo (X_442,X_443) := iterator.next(date_addmonths); diff --git a/monetdb5/mal/Tests/tst1205.stable.out b/monetdb5/mal/Tests/tst1205.stable.out --- a/monetdb5/mal/Tests/tst1205.stable.out +++ b/monetdb5/mal/Tests/tst1205.stable.out @@ -732,8 +732,8 @@ exit (X_592,X_593); # Skipped due to coercion implication
MonetDB: default - Fix algebra.fetch to check for correct bounda...
Changeset: 45f83f67b6bf for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=45f83f67b6bf Modified Files: monetdb5/modules/kernel/algebra.mx Branch: default Log Message: Fix algebra.fetch to check for correct boundaries. The argument is a BUN, but valid BUN values go from BINfirst() to BUNlast(). diffs (12 lines): diff --git a/monetdb5/modules/kernel/algebra.mx b/monetdb5/modules/kernel/algebra.mx --- a/monetdb5/modules/kernel/algebra.mx +++ b/monetdb5/modules/kernel/algebra.mx @@ -3417,7 +3417,7 @@ ALGfetch(ptr ret, int *bid, lng *pos) if ((b = BATdescriptor(*bid)) == NULL) { throw(MAL, algebra.fetch, RUNTIME_OBJECT_MISSING); } - if ((*pos 0) || (*pos = (lng) BATcount(b))) + if ((*pos (lng) BUNfirst(b)) || (*pos = (lng) BUNlast(b))) throw(MAL, algebra.fetch, ILLEGAL_ARGUMENT Idx out of range\n); msg = doALGfetch(ret, b, (BUN) *pos); BBPreleaseref(b-batCacheid); ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Fix iterator use.
Changeset: 3db75b2ec791 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3db75b2ec791 Modified Files: monetdb5/optimizer/opt_multiplex.c Branch: default Log Message: Fix iterator use. The iterator now iterates over the BUN and tail values. This means we can't just use the first (i.e. BUN) value as if it was the head of the iterator bat. We need to fetch the value from the bat to get the head value. diffs (37 lines): diff --git a/monetdb5/optimizer/opt_multiplex.c b/monetdb5/optimizer/opt_multiplex.c --- a/monetdb5/optimizer/opt_multiplex.c +++ b/monetdb5/optimizer/opt_multiplex.c @@ -48,6 +48,7 @@ OPTexpandMultiplex(Client cntxt, MalBlkP { int i = 2, resB, iter = 0, cr; int hvar, tvar; + int x, y; str mod, fcn; int *alias; InstrPtr q; @@ -130,12 +131,24 @@ OPTexpandMultiplex(Client cntxt, MalBlkP q = pushArgument(mb, q, getArg(pci, i)); } + /* x := bat.reverse(A1); y := algebra.fetch(x,h); */ + x = newTmpVariable(mb, newBatType(getTailType(getVarType(mb,iter)), + getHeadType(getVarType(mb,iter; + q = newFcnCall(mb, batRef, reverseRef); + getArg(q, 0) = x; + q = pushArgument(mb, q, iter); + y = newTmpVariable(mb, getHeadType(getVarType(mb,iter))); + q = newFcnCall(mb, algebraRef, fetch); + getArg(q, 0) = y; + q = pushArgument(mb, q, x); + q = pushArgument(mb, q, hvar); + /* insert(resB,h,cr); not append(resB, cr); the head type (oid) may dynamically change */ q = newFcnCall(mb, batRef, insertRef); q= pushArgument(mb, q, resB); - q= pushArgument(mb, q, hvar); + q= pushArgument(mb, q, y); (void) pushArgument(mb, q, cr); /* redo (h,r):= iterator.next(refBat); */ ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2012 - jaql/parser: fix include order to silence war...
Changeset: 7f9dbb959c64 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f9dbb959c64 Modified Files: monetdb5/extras/jaql/parser/jaql.l Branch: Jul2012 Log Message: jaql/parser: fix include order to silence warning with bison-2.6 The jc/struct _jc type isn't known to the tab.h file, so make sure we have its definition before including it. diffs (13 lines): diff --git a/monetdb5/extras/jaql/parser/jaql.l b/monetdb5/extras/jaql/parser/jaql.l --- a/monetdb5/extras/jaql/parser/jaql.l +++ b/monetdb5/extras/jaql/parser/jaql.l @@ -19,8 +19,8 @@ %{ #include stdio.h +#include jaqltree.h #include jaql.tab.h -#include jaqltree.h #ifdef _MSC_VER #define snprintf _snprintf #define fileno _fileno ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - White space fixes.
Changeset: c7d7d73d3aea for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c7d7d73d3aea Modified Files: monetdb5/optimizer/opt_multiplex.c Branch: default Log Message: White space fixes. diffs (49 lines): diff --git a/monetdb5/optimizer/opt_multiplex.c b/monetdb5/optimizer/opt_multiplex.c --- a/monetdb5/optimizer/opt_multiplex.c +++ b/monetdb5/optimizer/opt_multiplex.c @@ -3,14 +3,14 @@ * Version 1.1 (the License); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.monetdb.org/Legal/MonetDBLicense - * + * * Software distributed under the License is distributed on an AS IS * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. - * + * * The Original Code is the MonetDB Database System. - * + * * The Initial Developer of the Original Code is CWI. * Portions created by CWI are Copyright (C) 1997-July 2008 CWI. * Copyright August 2008-2012 MonetDB B.V. @@ -143,9 +143,9 @@ OPTexpandMultiplex(Client cntxt, MalBlkP q = pushArgument(mb, q, x); q = pushArgument(mb, q, hvar); - /* insert(resB,h,cr); + /* insert(resB,h,cr); not append(resB, cr); the head type (oid) may dynamically change */ - + q = newFcnCall(mb, batRef, insertRef); q= pushArgument(mb, q, resB); q= pushArgument(mb, q, y); @@ -215,12 +215,12 @@ OPTmultiplexImplementation(Client cntxt, for (i = 0; i limit; i++) { p = old[i]; - if (msg == MAL_SUCCEED -getModuleId(p) == malRef + if (msg == MAL_SUCCEED +getModuleId(p) == malRef getFunctionId(p) == multiplexRef) { msg = OPTexpandMultiplex(cntxt, mb, stk, p); if( msg== MAL_SUCCEED){ - freeInstruction(p); + freeInstruction(p); old[i]=0; } else { pushInstruction(mb, p); ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Move algebra.reverse() call outside the loop.
Changeset: bcf39e917224 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bcf39e917224 Modified Files: monetdb5/optimizer/opt_multiplex.c Branch: default Log Message: Move algebra.reverse() call outside the loop. diffs (31 lines): diff --git a/monetdb5/optimizer/opt_multiplex.c b/monetdb5/optimizer/opt_multiplex.c --- a/monetdb5/optimizer/opt_multiplex.c +++ b/monetdb5/optimizer/opt_multiplex.c @@ -87,6 +87,13 @@ OPTexpandMultiplex(Client cntxt, MalBlkP /* resB := new(refBat) */ if (isAnyExpression(getArgType(mb, pci, 0))) return createException(MAL, optimizer.multiplex, Target type is missing); + /* x := bat.reverse(A1); */ + x = newTmpVariable(mb, newBatType(getTailType(getVarType(mb,iter)), + getHeadType(getVarType(mb,iter; + q = newFcnCall(mb, batRef, reverseRef); + getArg(q, 0) = x; + q = pushArgument(mb, q, iter); + q = newFcnCall(mb, batRef, newRef); resB = getArg(q, 0); @@ -131,12 +138,7 @@ OPTexpandMultiplex(Client cntxt, MalBlkP q = pushArgument(mb, q, getArg(pci, i)); } - /* x := bat.reverse(A1); y := algebra.fetch(x,h); */ - x = newTmpVariable(mb, newBatType(getTailType(getVarType(mb,iter)), - getHeadType(getVarType(mb,iter; - q = newFcnCall(mb, batRef, reverseRef); - getArg(q, 0) = x; - q = pushArgument(mb, q, iter); + /* y := algebra.fetch(x,h); */ y = newTmpVariable(mb, getHeadType(getVarType(mb,iter))); q = newFcnCall(mb, algebraRef, fetch); getArg(q, 0) = y; ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2012 - sql/parser: make compile with bison-2.6
Changeset: d3e0e0e7e4f6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d3e0e0e7e4f6 Modified Files: sql/server/sql_parser.h sql/server/sql_parser.y sql/server/sql_scan.c Branch: Jul2012 Log Message: sql/parser: make compile with bison-2.6 properly type the param carried around by bison, use default error function from bison to avoid conflicts lateron diffs (truncated from 677 to 300 lines): diff --git a/sql/server/sql_parser.h b/sql/server/sql_parser.h --- a/sql/server/sql_parser.h +++ b/sql/server/sql_parser.h @@ -187,8 +187,8 @@ typedef enum jt { extern char *token2string(int token); extern void *sql_error(mvc *sql, int error_code, _In_z_ _Printf_format_string_ char *format, ...) __attribute__((__format__(__printf__, 3, 4))); -extern int parse_error(mvc *sql, const char *s); -extern int sqlparse(void *); +extern int sqlerror(mvc *sql, const char *s); +extern int sqlparse(mvc *m); #endif /*_SQL_PARSER_H_*/ diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -32,7 +32,7 @@ #include string.h #include stdlib.h -#define SA (((mvc*)parm)-sa) +#define SA m-sa #define _symbol_create(t,d) symbol_create( SA, t, d) #define _symbol_create_list(t,d)symbol_create_list( SA, t, d) #define _symbol_create_int(t,d) symbol_create_int( SA, t, d) @@ -51,14 +51,6 @@ #define append_type(l,d) dlist_append_type( SA, l, d) #define _atom_string(t, v) atom_string(SA, t, v) - -#define YYPARSE_PARAM parm -#define YYLEX_PARAM parm -#ifdef yyerror -#undef yyerror -#endif -#define yyerror(s) parse_error(YYLEX_PARAM, s) -#define sqlerror(s) parse_error(YYLEX_PARAM, s)/* needed for bison++ 1.21.11-3 */ #define YYMALLOC malloc #define YYFREE free @@ -77,6 +69,10 @@ * UDT */ +%define api.pure +%parse-param { mvc *m } +%lex-param { void *m } + /* reentrant parser */ %pure_parser %union { @@ -566,7 +562,6 @@ SQLCODE SQLERROR UNDER WHENEVER sqlstmt: sql SCOLON { - mvc *m = (mvc*)parm; if (m-sym) { append_symbol(m-sym-data.lval, $$); $$ = m-sym; @@ -576,12 +571,12 @@ sqlstmt: YYACCEPT; } - | PREPARE { mvc *m = (mvc*)parm; + | PREPARE { m-emode = m_prepare; m-scanner.as = m-scanner.yycur; m-scanner.key = 0; } - sql SCOLON { mvc *m = (mvc*)parm; + sql SCOLON { if (m-sym) { append_symbol(m-sym-data.lval, $3); $$ = m-sym; @@ -590,12 +585,12 @@ sqlstmt: } YYACCEPT; } - | SQL_PLAN{ mvc *m = (mvc*)parm; + | SQL_PLAN{ m-emode = m_plan; m-scanner.as = m-scanner.yycur; m-scanner.key = 0; } - sql SCOLON { mvc *m = (mvc*)parm; + sql SCOLON { if (m-sym) { append_symbol(m-sym-data.lval, $3); $$ = m-sym; @@ -605,12 +600,12 @@ sqlstmt: YYACCEPT; } - | SQL_EXPLAIN { mvc *m = (mvc*)parm; + | SQL_EXPLAIN { m-emod |= mod_explain; m-scanner.as = m-scanner.yycur; m-scanner.key = 0; } - sql SCOLON { mvc *m = (mvc*)parm; + sql SCOLON { if (m-sym) { append_symbol(m-sym-data.lval, $3); $$ = m-sym; @@ -620,12 +615,12 @@ sqlstmt: YYACCEPT; } - | SQL_DOT { mvc *m = (mvc*)parm; + | SQL_DOT { m-emod |= mod_dot; m-scanner.as = m-scanner.yycur; m-scanner.key = 0; } - sql SCOLON { mvc *m = (mvc*)parm; + sql SCOLON { if (m-sym) { append_symbol(m-sym-data.lval, $3); $$ = m-sym; @@ -635,9 +630,9 @@ sqlstmt: YYACCEPT; } - | SQL_DEBUG { mvc *m = (mvc*)parm; + | SQL_DEBUG { if (m-scanner.mode == LINE_1) { - yyerror(SQL debugging only supported in interactive mode); + yyerror(m, SQL debugging only supported in interactive mode); YYABORT;
MonetDB: default - Approved after changesets 3db75b2ec791 and bc...
Changeset: f9ecf1c2d596 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f9ecf1c2d596 Modified Files: monetdb5/mal/Tests/tst1200.stable.out monetdb5/mal/Tests/tst1201.stable.out monetdb5/mal/Tests/tst1202.stable.out monetdb5/mal/Tests/tst1203.stable.out monetdb5/mal/Tests/tst1205.stable.out monetdb5/mal/Tests/tst850.stable.out monetdb5/mal/Tests/tst903.stable.out monetdb5/mal/Tests/tst904.stable.out monetdb5/mal/Tests/tst905.stable.out monetdb5/mal/Tests/tst907.stable.out monetdb5/optimizer/Tests/Mexample.stable.out monetdb5/optimizer/Tests/remap.stable.out Branch: default Log Message: Approved after changesets 3db75b2ec791 and bcf39e917224. Also fixed an incorrect approval in changeset 95370bb07d9f. diffs (truncated from 2564 to 300 lines): diff --git a/monetdb5/mal/Tests/tst1200.stable.out b/monetdb5/mal/Tests/tst1200.stable.out --- a/monetdb5/mal/Tests/tst1200.stable.out +++ b/monetdb5/mal/Tests/tst1200.stable.out @@ -651,240 +651,296 @@ function user.main():void; ## test the operations on rules ma_a := bat.setColumn(rule_bat,rule); #io.print(rule_bat.bat.setColumn(rule), -X_847 := bat.new(nil:oid,nil:int); -barrier (X_851,X_852) := iterator.new(rule_bat); -X_854 := mtime.month(X_852); -bat.insert(X_847,X_851,X_854); -redo (X_851,X_852) := iterator.next(rule_bat); -exit (X_851,X_852); -na_a:bat[:oid,:int] := X_847; +X_847 := bat.reverse(rule_bat); +X_849 := bat.new(nil:oid,nil:int); +barrier (X_853,X_854) := iterator.new(rule_bat); +X_856 := mtime.month(X_854); +X_857 := algebra.fetch(X_847,X_853); +bat.insert(X_849,X_857,X_856); +redo (X_853,X_854) := iterator.next(rule_bat); +exit (X_853,X_854); +na_a:bat[:oid,:int] := X_849; oa_a := bat.setColumn(na_a,month); # [month](rule_bat).bat.setColumn(month), -X_859 := bat.new(nil:oid,nil:int); -barrier (X_861,X_862) := iterator.new(rule_bat); -X_864 := mtime.weekday(X_862); -bat.insert(X_859,X_861,X_864); -redo (X_861,X_862) := iterator.next(rule_bat); -exit (X_861,X_862); -pa_a:bat[:oid,:int] := X_859; +X_863 := bat.reverse(rule_bat); +X_865 := bat.new(nil:oid,nil:int); +barrier (X_867,X_868) := iterator.new(rule_bat); +X_870 := mtime.weekday(X_868); +X_871 := algebra.fetch(X_863,X_867); +bat.insert(X_865,X_871,X_870); +redo (X_867,X_868) := iterator.next(rule_bat); +exit (X_867,X_868); +pa_a:bat[:oid,:int] := X_865; qa_a := bat.setColumn(pa_a,weekday); # [weekday](rule_bat).bat.setColumn(weekday), -X_869 := bat.new(nil:oid,nil:int); -barrier (X_871,X_872) := iterator.new(rule_bat); -X_874 := mtime.day(X_872); -bat.insert(X_869,X_871,X_874); -redo (X_871,X_872) := iterator.next(rule_bat); -exit (X_871,X_872); -ra_a:bat[:oid,:int] := X_869; +X_877 := bat.reverse(rule_bat); +X_879 := bat.new(nil:oid,nil:int); +barrier (X_881,X_882) := iterator.new(rule_bat); +X_884 := mtime.day(X_882); +X_885 := algebra.fetch(X_877,X_881); +bat.insert(X_879,X_885,X_884); +redo (X_881,X_882) := iterator.next(rule_bat); +exit (X_881,X_882); +ra_a:bat[:oid,:int] := X_879; sa_a := bat.setColumn(ra_a,day); # [day](rule_bat).bat.setColumn(day), -X_879 := bat.new(nil:oid,nil:int); -barrier (X_881,X_882) := iterator.new(rule_bat); -X_884 := mtime.minutes(X_882); -bat.insert(X_879,X_881,X_884); -redo (X_881,X_882) := iterator.next(rule_bat); -exit (X_881,X_882); -ta_a:bat[:oid,:int] := X_879; +X_891 := bat.reverse(rule_bat); +X_893 := bat.new(nil:oid,nil:int); +barrier (X_897,X_898) := iterator.new(rule_bat); +X_900 := mtime.minutes(X_898); +X_901 := algebra.fetch(X_891,X_897); +bat.insert(X_893,X_901,X_900); +redo (X_897,X_898) := iterator.next(rule_bat); +exit (X_897,X_898); +ta_a:bat[:oid,:int] := X_893; ua_a := bat.setColumn(ta_a,minutes); io.print(rule_bat,na_a,pa_a,ra_a,ta_a); va_a := io.print(month_bat,rule_bat,na_a,pa_a,ra_a,ta_a); # [minutes](rule_bat).bat.setColumn(minutes)); bat.setColumn(rule_bat,rule); #io.print(rule_bat.bat.setColumn(rule), -X_889 := bat.new(nil:oid,nil:date); -barrier (X_893,X_894) := iterator.new(rule_bat); -X_896 := mtime.compute(X_894,2001); -bat.insert(X_889,X_893,X_896); -redo (X_893,X_894) := iterator.next(rule_bat); -exit (X_893,X_894); -xa_a:bat[:oid,:date] := X_889; +X_907 := bat.reverse(rule_bat); +X_909 := bat.new(nil:oid,nil:date); +barrier (X_912,X_913) := iterator.new(rule_bat); +X_915 := mtime.compute(X_913,2001); +X_916 := algebra.fetch(X_907,X_912); +bat.insert(X_909,X_916,X_915); +redo (X_912,X_913) := iterator.next(rule_bat); +exit (X_912,X_913); +xa_a:bat[:oid,:date] := X_909; ya_a := bat.setColumn(xa_a,2001); # [compute](rule_bat, 2001).bat.setColumn(2001), -X_901 :=
MonetDB: default - Merged from Jul2012
Changeset: b9d79d1ec39c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b9d79d1ec39c Modified Files: monetdb5/extras/jaql/parser/jaql.l sql/server/sql_parser.h sql/server/sql_parser.y sql/server/sql_scan.c Branch: default Log Message: Merged from Jul2012 diffs (truncated from 690 to 300 lines): diff --git a/monetdb5/extras/jaql/parser/jaql.l b/monetdb5/extras/jaql/parser/jaql.l --- a/monetdb5/extras/jaql/parser/jaql.l +++ b/monetdb5/extras/jaql/parser/jaql.l @@ -19,8 +19,8 @@ %{ #include stdio.h +#include jaqltree.h #include jaql.tab.h -#include jaqltree.h #ifdef _MSC_VER #define snprintf _snprintf #define fileno _fileno diff --git a/sql/server/sql_parser.h b/sql/server/sql_parser.h --- a/sql/server/sql_parser.h +++ b/sql/server/sql_parser.h @@ -187,8 +187,8 @@ typedef enum jt { extern char *token2string(int token); extern void *sql_error(mvc *sql, int error_code, _In_z_ _Printf_format_string_ char *format, ...) __attribute__((__format__(__printf__, 3, 4))); -extern int parse_error(mvc *sql, const char *s); -extern int sqlparse(void *); +extern int sqlerror(mvc *sql, const char *s); +extern int sqlparse(mvc *m); #endif /*_SQL_PARSER_H_*/ diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -32,7 +32,7 @@ #include string.h #include stdlib.h -#define SA (((mvc*)parm)-sa) +#define SA m-sa #define _symbol_create(t,d) symbol_create( SA, t, d) #define _symbol_create_list(t,d)symbol_create_list( SA, t, d) #define _symbol_create_int(t,d) symbol_create_int( SA, t, d) @@ -51,14 +51,6 @@ #define append_type(l,d) dlist_append_type( SA, l, d) #define _atom_string(t, v) atom_string(SA, t, v) - -#define YYPARSE_PARAM parm -#define YYLEX_PARAM parm -#ifdef yyerror -#undef yyerror -#endif -#define yyerror(s) parse_error(YYLEX_PARAM, s) -#define sqlerror(s) parse_error(YYLEX_PARAM, s)/* needed for bison++ 1.21.11-3 */ #define YYMALLOC malloc #define YYFREE free @@ -77,6 +69,10 @@ * UDT */ +%define api.pure +%parse-param { mvc *m } +%lex-param { void *m } + /* reentrant parser */ %pure_parser %union { @@ -566,7 +562,6 @@ SQLCODE SQLERROR UNDER WHENEVER sqlstmt: sql SCOLON { - mvc *m = (mvc*)parm; if (m-sym) { append_symbol(m-sym-data.lval, $$); $$ = m-sym; @@ -576,12 +571,12 @@ sqlstmt: YYACCEPT; } - | PREPARE { mvc *m = (mvc*)parm; + | PREPARE { m-emode = m_prepare; m-scanner.as = m-scanner.yycur; m-scanner.key = 0; } - sql SCOLON { mvc *m = (mvc*)parm; + sql SCOLON { if (m-sym) { append_symbol(m-sym-data.lval, $3); $$ = m-sym; @@ -590,12 +585,12 @@ sqlstmt: } YYACCEPT; } - | SQL_PLAN{ mvc *m = (mvc*)parm; + | SQL_PLAN{ m-emode = m_plan; m-scanner.as = m-scanner.yycur; m-scanner.key = 0; } - sql SCOLON { mvc *m = (mvc*)parm; + sql SCOLON { if (m-sym) { append_symbol(m-sym-data.lval, $3); $$ = m-sym; @@ -605,12 +600,12 @@ sqlstmt: YYACCEPT; } - | SQL_EXPLAIN { mvc *m = (mvc*)parm; + | SQL_EXPLAIN { m-emod |= mod_explain; m-scanner.as = m-scanner.yycur; m-scanner.key = 0; } - sql SCOLON { mvc *m = (mvc*)parm; + sql SCOLON { if (m-sym) { append_symbol(m-sym-data.lval, $3); $$ = m-sym; @@ -620,12 +615,12 @@ sqlstmt: YYACCEPT; } - | SQL_DOT { mvc *m = (mvc*)parm; + | SQL_DOT { m-emod |= mod_dot; m-scanner.as = m-scanner.yycur; m-scanner.key = 0; } - sql SCOLON { mvc *m = (mvc*)parm; + sql SCOLON { if (m-sym) { append_symbol(m-sym-data.lval, $3); $$ = m-sym; @@ -635,9 +630,9 @@ sqlstmt: YYACCEPT; } - | SQL_DEBUG { mvc *m = (mvc*)parm; + | SQL_DEBUG { if (m-scanner.mode == LINE_1)
MonetDB: default - Rearrange error checking so that it happens b...
Changeset: e4c0515be8c3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4c0515be8c3 Modified Files: monetdb5/optimizer/Tests/remap.stable.out monetdb5/optimizer/opt_multiplex.c Branch: default Log Message: Rearrange error checking so that it happens before any code is generated. diffs (79 lines): diff --git a/monetdb5/optimizer/Tests/remap.stable.out b/monetdb5/optimizer/Tests/remap.stable.out --- a/monetdb5/optimizer/Tests/remap.stable.out +++ b/monetdb5/optimizer/Tests/remap.stable.out @@ -22,7 +22,6 @@ function user.tst():void; # demonstrate an error y:bat[:int,:int] := mal.multiplex(calc,+,b,1); end tst; -!TypeException:user.tst[10]:'bat.new' undefined in: _20:any := bat.new() function user.main():void; # it will be ignored by the optimizer mdb.List(user,tst); @@ -36,10 +35,8 @@ function user.tst():void; d := bat.new(:oid,:str);# 6 d:bat[:oid,:str] := CMDBATnew(_2:oid, _13:str) {G} a:bat[:oid,:bit] := batcalc.isnil(d);# 7 a:bat[:oid,:bit] := CMDbatISNIL(d:bat[:oid,:str]) {G} # demonstrate an error -bat.reverse(b); # 9 _18:bat[:int,:oid] := BKCreverse(b:bat[:oid,:int]) {G} -bat.new(); # 10 _20:any := bat.new() {U} -y:bat[:int,:int] := mal.multiplex(calc,+,b,1);# 11 y:bat[:int,:int] := OPTremapMultiplex(_6:str, _7:str, b:bat[:oid,:int], _8:int) {G} -end tst;# 12 +y:bat[:int,:int] := mal.multiplex(calc,+,b,1);# 9 y:bat[:int,:int] := OPTremapMultiplex(_6:str, _7:str, b:bat[:oid,:int], _8:int) {G} +end tst;# 10 # 22:31:17 # 22:31:17 Done. diff --git a/monetdb5/optimizer/opt_multiplex.c b/monetdb5/optimizer/opt_multiplex.c --- a/monetdb5/optimizer/opt_multiplex.c +++ b/monetdb5/optimizer/opt_multiplex.c @@ -56,9 +56,16 @@ OPTexpandMultiplex(Client cntxt, MalBlkP (void) cntxt; (void) stk; - alias= (int*) GDKmalloc(sizeof(int) * pci-maxarg); - if (alias == NULL) - return NULL; + + ht = getHeadType(getArgType(mb, pci, 0)); + if (ht != TYPE_oid) + return createException(MAL, optimizer.multiplex, Target head type is missing); + tt = getTailType(getArgType(mb, pci, 0)); + if (tt== TYPE_any) + return createException(MAL, optimizer.multiplex, Target tail type is missing); + if (isAnyExpression(getArgType(mb, pci, 0))) + return createException(MAL, optimizer.multiplex, Target type is missing); + mod = VALget(getVar(mb, getArg(pci, 1))-value); mod = putName(mod,strlen(mod)); fcn = VALget(getVar(mb, getArg(pci, 2))-value); @@ -84,9 +91,11 @@ OPTexpandMultiplex(Client cntxt, MalBlkP * because in the end we issue a recursive function call that should * find the actual arguments at the proper place of the callee. */ - /* resB := new(refBat) */ - if (isAnyExpression(getArgType(mb, pci, 0))) - return createException(MAL, optimizer.multiplex, Target type is missing); + + alias= (int*) GDKmalloc(sizeof(int) * pci-maxarg); + if (alias == NULL) + return NULL; + /* x := bat.reverse(A1); */ x = newTmpVariable(mb, newBatType(getTailType(getVarType(mb,iter)), getHeadType(getVarType(mb,iter; @@ -94,15 +103,10 @@ OPTexpandMultiplex(Client cntxt, MalBlkP getArg(q, 0) = x; q = pushArgument(mb, q, iter); + /* resB := new(refBat) */ q = newFcnCall(mb, batRef, newRef); resB = getArg(q, 0); - ht = getHeadType(getArgType(mb, pci, 0)); - if (ht== TYPE_any || ht != TYPE_oid) - return createException(MAL, optimizer.multiplex, Target head type is missing); - tt = getTailType(getArgType(mb, pci, 0)); - if (tt== TYPE_any) - return createException(MAL, optimizer.multiplex, Target tail type is missing); setVarType(mb, getArg(q, 0), newBatType(ht, tt)); q = pushType(mb, q, ht); q = pushType(mb, q, tt); ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Updated comments.
Changeset: 751b71c3eaa9 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=751b71c3eaa9 Modified Files: monetdb5/optimizer/opt_multiplex.c Branch: default Log Message: Updated comments. diffs (27 lines): diff --git a/monetdb5/optimizer/opt_multiplex.c b/monetdb5/optimizer/opt_multiplex.c --- a/monetdb5/optimizer/opt_multiplex.c +++ b/monetdb5/optimizer/opt_multiplex.c @@ -21,20 +21,21 @@ #include mal_interpreter.h /* - * @- * The generic solution to the multiplex operators is to translate * them to a MAL loop. * The call optimizer.multiplex(MOD,FCN,A1,...An) introduces the following code * structure: * * @verbatim + * A1rev:=bat.reverse(A1); * resB:= bat.new(A1); * barrier (h,t):= iterator.new(A1); * $1:= algebra.fetch(A1,h); * $2:= A2;# in case of constant? * ... * cr:= MOD.FCN($1,...,$n); - * bat.insert(resB,h,cr); + * y:=algebra.fetch(A1rev,h); + * bat.insert(resB,y,cr); * redo (h,t):= iterator.next(A1); * end h; * @end verbatim ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - modulechk: simplified fixed test and stable...
Changeset: 180c2c110cad for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=180c2c110cad Modified Files: monetdb5/modules/mal/Tests/modulechk.mal monetdb5/modules/mal/Tests/modulechk.stable.out Branch: default Log Message: modulechk: simplified fixed test and stable output; this should fix bug 3127 diffs (139 lines): diff --git a/monetdb5/modules/mal/Tests/modulechk.mal b/monetdb5/modules/mal/Tests/modulechk.mal --- a/monetdb5/modules/mal/Tests/modulechk.mal +++ b/monetdb5/modules/mal/Tests/modulechk.mal @@ -1,17 +1,6 @@ function test(); c := mdb.modules(); mods := algebra.kunique(c); -s := \\nModules: ; -sep := ; -barrier (h:oid,t:str) := iterator.new(mods); - s := s + sep; - s := s + \'; - s := s + t; - s := s + \'; - sep := ,; -redo (h:oid,t:str) := iterator.next(mods); -exit h; -s := s + \\n; -io.printf(s); +io.print(mods); end test; test(); diff --git a/monetdb5/modules/mal/Tests/modulechk.stable.out b/monetdb5/modules/mal/Tests/modulechk.stable.out --- a/monetdb5/modules/mal/Tests/modulechk.stable.out +++ b/monetdb5/modules/mal/Tests/modulechk.stable.out @@ -21,24 +21,97 @@ stdout of test 'modulechk` in directory function user.test():void; c := mdb.modules(); mods := algebra.kunique(c); -s := \\nModules: ; -sep := ; -barrier (h:oid ,t:str ) := iterator.new(mods); -s := calc.+(s,sep); -s := calc.+(s,'); -s := calc.+(s,t); -s := calc.+(s,'); -sep := ,; -redo (h:oid ,t:str ) := iterator.next(mods); -exit h:oid ; -s := calc.+(s,\\n); -io.printf(s); +io.print(mods); end test; function user.main():void; user.test(); end main; -\nModules: 'profiler','run_isolate','opt_constants','counters','recycle','opt_accessmode','aggr','tokenizer','constraints','lock','str','algebraExtensions','optimizer','batstr','opt_mergetable','opt_macro','opt_accumulators','language','run_octopus','opt_reduce','opt_prejoin','udf','srvpool','xml','opt_joinselect','opt_remoteQueries','alarm','txtsim','color','datacell','mtime','opt_datacell','sample','algebra','opt_deadcode','opt_cluster','mal_compiler','trader','opt_aliases','iterator','basket','opt_compression','mal_mapi','remote','opt_dataflow','factories','inet','batifthen','opt_origin','opt_support','unix','opt_reorder','opt_statistics','transaction','group','bat5','mat','opt_remap','blob','tablet','opt_factorize','mkey','urlbox','opt_mapreduce','cluster','sabaoth','vault','microbenchmark','run_memo','sql','status','array','chopper','pma','dcoperator','mmath','const','opt_centipede','opt_commonTerms','opt_evaluate','pcre','zorder','opt_recycler','opt_strengthReduction', 'opt_sql_append','opt_octopus','opt_datacyclotron','opt_coercion','sema','opt_qep','geom','clients','statistics','opt_history','attach','calc','petrinet','run_adder','opt_peephole','inspect','batExtensions','logger','bbp','batcalc','emitter','batmtime','opt_garbageCollector','receptor','opt_singleton','opt_joinpath','batmmath','mal_io','batcolor','manual','json','opt_costModel','fits','mdb','opt_groups','opt_emptySet','identifier','opt_inline','url','opt_pushranges','opt_dictionary','streams','mal_init','opt_trace','lsst','jaql','groupby','batxml','opt_mitosis','jaqlfunc','opt_multiplex','pqueue','box'\n -# 04:02:09 -# 04:02:09 Done. -# 04:02:09 +#-# +# ht # name +# void str # type +#-# +[ 0@0, bbp ] +[ 1@0, blob ] +[ 2@0, urlbox] +[ 3@0, sema ] +[ 4@0, recycle ] +[ 5@0, language ] +[ 6@0, aggr ] +[ 7@0, mmath ] +[ 8@0, url ] +[ 9@0, mkey ] +[ 10@0, mal_init ] +[ 11@0, counters ] +[ 12@0, manual] +[ 13@0, mdb ] +[ 14@0, mat ] +[ 15@0, bat5 ] +[ 16@0, zorder] +[ 17@0, opt_sql_append] +[ 18@0, vault ] +[ 19@0, inet ] +[ 20@0, sabaoth ] +[ 21@0, profiler ] +[ 22@0, mal_io] +[ 23@0, iterator ] +[ 24@0, sql ] +[ 25@0, run_isolate ] +[ 26@0, microbenchmark] +[ 27@0, groupby ] +[ 28@0, tokenizer ] +[ 29@0, pqueue] +[ 30@0, remote] +[ 31@0, algebra ] +[ 32@0, batExtensions ] +[ 33@0, xml ] +[ 34@0, jaqlfunc ] +[ 35@0, run_adder ] +[ 36@0, lsst
MonetDB: default - Some more const declarations.
Changeset: 34119ad3e24c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=34119ad3e24c Modified Files: gdk/gdk.h gdk/gdk_private.h gdk/gdk_qsort.c gdk/gdk_ssort.c gdk/gdk_ssort_impl.h Branch: default Log Message: Some more const declarations. diffs (82 lines): diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -1683,8 +1683,8 @@ gdk_export int BATordered_rev(BAT *b); gdk_export BAT *BATssort(BAT *b); gdk_export BAT *BATssort_rev(BAT *b); -gdk_export void GDKqsort(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); -gdk_export void GDKqsort_rev(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); +gdk_export void GDKqsort(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); +gdk_export void GDKqsort_rev(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); #define BAThordered(b) ((b)-htype == TYPE_void || (b)-hsorted) #define BATtordered(b) ((b)-ttype == TYPE_void || (b)-tsorted) diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h --- a/gdk/gdk_private.h +++ b/gdk/gdk_private.h @@ -69,8 +69,8 @@ int GDKmunmap(void *addr, size_t len); void *GDKreallocmax(void *pold, size_t size, size_t *maxsize, int emergency); int GDKremovedir(const char *nme); int GDKsave(const char *nme, const char *ext, void *buf, size_t size, storage_t mode); -int GDKssort_rev(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); -int GDKssort(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); +int GDKssort_rev(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); +int GDKssort(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); int GDKunlink(const char *dir, const char *nme, const char *extension); int HASHgonebad(BAT *b, const void *v); BUN HASHmask(BUN cnt); diff --git a/gdk/gdk_qsort.c b/gdk/gdk_qsort.c --- a/gdk/gdk_qsort.c +++ b/gdk/gdk_qsort.c @@ -25,7 +25,7 @@ struct qsort_t { unsigned int hs; unsigned int ts; int (*cmp)(const void *, const void *); - char *base; + const char *base; }; /* return index of middle value at indexes a, b, and c */ @@ -293,7 +293,7 @@ struct qsort_t { /* the interface functions */ void -GDKqsort(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe) +GDKqsort(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe) { struct qsort_t buf; @@ -340,7 +340,7 @@ GDKqsort(void *h, void *t, void *base, s } void -GDKqsort_rev(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe) +GDKqsort_rev(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe) { struct qsort_t buf; diff --git a/gdk/gdk_ssort.c b/gdk/gdk_ssort.c --- a/gdk/gdk_ssort.c +++ b/gdk/gdk_ssort.c @@ -49,7 +49,7 @@ struct slice { typedef struct { /* The comparison function. */ int (*compare) (const void *, const void *); - char *heap; + const char *heap; int hs; int ts; void *bh; diff --git a/gdk/gdk_ssort_impl.h b/gdk/gdk_ssort_impl.h --- a/gdk/gdk_ssort_impl.h +++ b/gdk/gdk_ssort_impl.h @@ -806,7 +806,7 @@ do_ssort(MergeState *ms, ssize_t nremain * the actual key is found at that offset (MonetDB var-sized * atoms). */ int -GDKssortimpl(void *h, void *t, void *heap, size_t nitems, +GDKssortimpl(void *h, void *t, const void *heap, size_t nitems, int hs, int ts, int tpe) { char temp; ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Approved after changeset 34119ad3e24c.
Changeset: 0649f1c5bc4c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0649f1c5bc4c Modified Files: clients/Tests/exports.stable.out Branch: default Log Message: Approved after changeset 34119ad3e24c. diffs (14 lines): 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 @@ -246,8 +246,8 @@ int GDKms(void); int GDKnr_threads; void GDKprotect(void); int GDKprotected; -void GDKqsort(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); -void GDKqsort_rev(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); +void GDKqsort(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); +void GDKqsort_rev(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); void *GDKrealloc(void *pold, size_t size); void GDKsetenv(str name, str value); ssize_t GDKstrFromStr(unsigned char *dst, const unsigned char *src, ssize_t len); ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Whitespace and comment cleanup.
Changeset: af92397f8328 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=af92397f8328 Modified Files: gdk/gdk_setop.mx monetdb5/modules/kernel/batmtime.mx Branch: default Log Message: Whitespace and comment cleanup. diffs (183 lines): diff --git a/gdk/gdk_setop.mx b/gdk/gdk_setop.mx --- a/gdk/gdk_setop.mx +++ b/gdk/gdk_setop.mx @@ -43,23 +43,28 @@ All Rights Reserved. * @item [s,k]intersection * produce bat intersection. * @end itemize - * Implementations typically take two forms: if the input relation(s) is/are - * ordered, a merge-algorithm is used. Otherwise, hash-indices are produced - * on demand for the hash-based versions. * - * The @emph{[k,s]intersect(l,r)} operations result in all BUNs of @emph{l} that - * are also in @emph{r}. They do not do double-elimination over the @emph{l} BUNs. + * Implementations typically take two forms: if the input relation(s) + * is/are ordered, a merge-algorithm is used. Otherwise, hash-indices + * are produced on demand for the hash-based versions. * - * The @emph{[k,s]diff(l,r)} operations result in all BUNs of @emph{l} that are - * not in @emph{r}. They do not do double-elimination over the @emph{l} BUNs. + * The @emph{[k,s]intersect(l,r)} operations result in all BUNs of + * @emph{l} that are also in @emph{r}. They do not do + * double-elimination over the @emph{l} BUNs. * - * The @emph{[k,s]union(l,r)} operations result in all BUNs of @emph{l}, plus - * all BUNs of @emph{r} that are not in @emph{l}. They do not do double-elimination - * over the @emph{l} nor @emph{r} BUNs. + * The @emph{[k,s]diff(l,r)} operations result in all BUNs of @emph{l} + * that are not in @emph{r}. They do not do double-elimination over + * the @emph{l} BUNs. * - * Operations with double-elimination can be formed by performing @emph{[k,s]unique(l)} on their operands. + * The @emph{[k,s]union(l,r)} operations result in all BUNs of + * @emph{l}, plus all BUNs of @emph{r} that are not in @emph{l}. They + * do not do double-elimination over the @emph{l} nor @emph{r} BUNs. * - * The @emph{kintersect(l,r)} is used also as implementation for the @emph{semijoin()}. + * Operations with double-elimination can be formed by performing + * @emph{[k,s]unique(l)} on their operands. + * + * The @emph{kintersect(l,r)} is used also as implementation for the + * @emph{semijoin()}. */ @h #ifndef _GDK_SETOP_H @@ -404,10 +409,10 @@ BATsunique(BAT *b) /* * @+ Difference and Intersect * Difference and Intersection are handled together. For each routine - * there are two versions: @`BATkdiff@5(l,r) and @`BATkintersect@5(l,r) (which - * look at the head column only), versus @`BATsdiff@5(l,r) and - * @`BATsintersect@5(l,r) (looking at both columns). - * TODO synced/key case.. + * there are two versions: @`BATkdiff@5(l,r) and + * @`BATkintersect@5(l,r) (which look at the head column only), versus + * @`BATsdiff@5(l,r) and @`BATsintersect@5(l,r) (looking at both + * columns). TODO synced/key case.. */ @= mergecheck BUN p1 = BUNfirst(l), p2 = BUNfirst(r); diff --git a/monetdb5/modules/kernel/batmtime.mx b/monetdb5/modules/kernel/batmtime.mx --- a/monetdb5/modules/kernel/batmtime.mx +++ b/monetdb5/modules/kernel/batmtime.mx @@ -119,7 +119,7 @@ batmtime_export str MTIMEbat_@1_cst_@2(i @= baselineCode str MTIMEbat_@1_@2(int *ret, int *l, int *r) -{ +{ BAT *bn, *b, *right; @1 *p, *q, *t; bit *o; @@ -139,7 +139,7 @@ str MTIMEbat_@1_@2(int *ret, int *l, int p = (@1*)Tloc(b,BUNfirst(b)); q = (@1*)Tloc(b,BUNlast(b)); t = (@1*)Tloc(right,BUNfirst(right)); - + BATaccessBegin(b, USE_TAIL, MMAP_SEQUENTIAL); BATaccessBegin(right, USE_TAIL, MMAP_SEQUENTIAL); if (b-T-nonil right-T-nonil) { @@ -158,20 +158,20 @@ str MTIMEbat_@1_@2(int *ret, int *l, int *o = bit_nil; else @1@2(o,p,t); else - for (;pq; p++, t++, o++) + for (;pq; p++, t++, o++) if ( @1_isnil(*p) || @1_isnil(*t)) *o = bit_nil; else @1@2(o,p,t); BATaccessEnd(right, USE_TAIL, MMAP_SEQUENTIAL); BATaccessEnd(b, USE_TAIL, MMAP_SEQUENTIAL); - if (!(bn-batDirty2)) bn = BATsetaccess(bn, BAT_READ); + if (!(bn-batDirty2)) bn = BATsetaccess(bn, BAT_READ); BATsetcount(bn, BATcount(b)); if (b-htype != bn-htype) { BAT *r = VIEWcreate(b,bn); - + BBPreleaseref(bn-batCacheid); bn = r; } @@ -186,7 +186,7 @@ str MTIMEbat_@1_@2(int *ret, int *l, int } str MTIMEbat_@1_@2_cst(int *ret, int *l, @1 *cst) -{ +{ BAT *bn, *b; @1 *p, *q; bit *o; @@ -200,10 +200,10 @@ str MTIMEbat_@1_@2_cst(int *ret, int *l, o = (bit*)Tloc(bn,BUNfirst(bn)); p = (@1*)Tloc(b,BUNfirst(b)); q =
MonetDB: sciql - Merge with default branch.
Changeset: 36cf4ed1b85f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=36cf4ed1b85f Modified Files: clients/Tests/exports.stable.out clients/python/monetdb/sql/cursors.py clients/python/monetdb/sql/monetize.py configure.ag gdk/gdk.h gdk/gdk_private.h gdk/gdk_qsort.c gdk/gdk_search.c gdk/gdk_select.c gdk/gdk_setop.mx gdk/gdk_ssort.c gdk/gdk_ssort_impl.h monetdb5/extras/jaql/parser/jaql.l monetdb5/extras/mal_optimizer_template/opt_sql_append.c monetdb5/mal/Tests/tst1200.stable.out monetdb5/mal/Tests/tst1201.stable.out monetdb5/mal/Tests/tst1202.stable.out monetdb5/mal/Tests/tst1203.stable.out monetdb5/mal/Tests/tst1205.stable.out monetdb5/mal/Tests/tst850.stable.out monetdb5/mal/Tests/tst901b.mal monetdb5/mal/Tests/tst901b.stable.out monetdb5/mal/Tests/tst902.mal monetdb5/mal/Tests/tst902.stable.out monetdb5/mal/Tests/tst903.stable.out monetdb5/mal/Tests/tst904.stable.out monetdb5/mal/Tests/tst905.stable.out monetdb5/mal/Tests/tst907.stable.out monetdb5/mal/mal_debugger.c monetdb5/mal/mal_profiler.c monetdb5/modules/kernel/algebra.mx monetdb5/modules/kernel/batmtime.mx monetdb5/modules/mal/Tests/modulechk.mal monetdb5/modules/mal/Tests/modulechk.stable.out monetdb5/modules/mal/language.c monetdb5/modules/mal/pcre.c monetdb5/modules/mal/pcre.mal monetdb5/modules/mal/profiler.c monetdb5/optimizer/Tests/Mexample.stable.out monetdb5/optimizer/Tests/remap.stable.out monetdb5/optimizer/opt_multiplex.c sql/backends/monet5/sql.mx sql/server/sql_parser.h sql/server/sql_parser.y sql/server/sql_scan.c sql/test/Tests/trace.stable.out tools/mserver/Makefile.ag tools/mserver/mserver5.c Branch: sciql Log Message: Merge with default branch. diffs (truncated from 5232 to 300 lines): 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 @@ -176,6 +176,7 @@ BAT *BATsubselect(BAT *b, BAT *s, const BAT *BATsunion(BAT *b, BAT *c); BAT *BATsunique(BAT *b); BAT *BATthetajoin(BAT *l, BAT *r, int mode, BUN estimate); +BAT *BATthetasubselect(BAT *b, BAT *s, const void *val, const char *op); int BATtopN(BAT *b, BUN topN); BAT *BATundo(BAT *b); BAT *BATuselect(BAT *b, const void *tl, const void *th); @@ -245,8 +246,8 @@ int GDKms(void); int GDKnr_threads; void GDKprotect(void); int GDKprotected; -void GDKqsort(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); -void GDKqsort_rev(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); +void GDKqsort(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); +void GDKqsort_rev(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); void *GDKrealloc(void *pold, size_t size); void GDKsetenv(str name, str value); ssize_t GDKstrFromStr(unsigned char *dst, const unsigned char *src, ssize_t len); @@ -746,6 +747,8 @@ str ALGtdiff(int *result, int *lid, int str ALGthetajoin(int *result, int *lid, int *rid, int *opc); str ALGthetajoinEstimate(int *result, int *lid, int *rid, int *opc, lng *estimate); str ALGthetaselect(int *result, int *bid, ptr low, str *op); +str ALGthetasubselect1(bat *result, bat *bid, const void *val, const char **op); +str ALGthetasubselect2(bat *result, bat *bid, bat *sid, const void *val, const char **op); str ALGthetauselect(int *result, int *bid, ptr value, str *op); str ALGthsort(int *result, int *lid); str ALGtintersect(int *result, int *lid, int *rid); @@ -1771,60 +1774,6 @@ void MSresetInstructions(MalBlkPtr mb, i void MSresetVariables(Client cntxt, MalBlkPtr mb, MalStkPtr glb, int start); void MSscheduleClient(str command, str challenge, bstream *fin, stream *fout); void MSserveClient(void *dummy); -str MTIMEaccum_date_EQ(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_EQ_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_GE(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_GE_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_GT(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_GT_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_LE(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_LE_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_LT(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_LT_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_NEQ(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_NEQ_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_cst_EQ(int *ret, int *r, date *cst, int *l); -str MTIMEaccum_date_cst_GE(int *ret, int *r, date *cst, int *l); -str
MonetDB: xid - Merge with default branch.
Changeset: 80d5069801ca for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=80d5069801ca Modified Files: clients/Tests/exports.stable.out clients/python/monetdb/sql/monetize.py gdk/gdk.h gdk/gdk_private.h gdk/gdk_qsort.c gdk/gdk_search.c gdk/gdk_setop.mx gdk/gdk_ssort.c gdk/gdk_ssort_impl.h monetdb5/extras/jaql/parser/jaql.l monetdb5/extras/mal_optimizer_template/opt_sql_append.c monetdb5/mal/Tests/tst1200.stable.out monetdb5/mal/Tests/tst1201.stable.out monetdb5/mal/Tests/tst1202.stable.out monetdb5/mal/Tests/tst1203.stable.out monetdb5/mal/Tests/tst1205.stable.out monetdb5/mal/Tests/tst850.stable.out monetdb5/mal/Tests/tst901b.mal monetdb5/mal/Tests/tst901b.stable.out monetdb5/mal/Tests/tst902.mal monetdb5/mal/Tests/tst902.stable.out monetdb5/mal/Tests/tst903.stable.out monetdb5/mal/Tests/tst904.stable.out monetdb5/mal/Tests/tst905.stable.out monetdb5/mal/Tests/tst907.stable.out monetdb5/mal/mal_profiler.c monetdb5/modules/kernel/algebra.mx monetdb5/modules/kernel/batmtime.mx monetdb5/modules/mal/Tests/modulechk.mal monetdb5/modules/mal/Tests/modulechk.stable.out monetdb5/modules/mal/pcre.c monetdb5/modules/mal/pcre.mal monetdb5/modules/mal/profiler.c monetdb5/optimizer/Tests/Mexample.stable.out monetdb5/optimizer/Tests/remap.stable.out monetdb5/optimizer/opt_multiplex.c sql/backends/monet5/sql.mx sql/server/sql_parser.h sql/server/sql_parser.y sql/server/sql_scan.c sql/test/Tests/trace.stable.out Branch: xid Log Message: Merge with default branch. diffs (truncated from 4747 to 300 lines): 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 @@ -176,6 +176,7 @@ BAT *BATsubselect(BAT *b, BAT *s, const BAT *BATsunion(BAT *b, BAT *c); BAT *BATsunique(BAT *b); BAT *BATthetajoin(BAT *l, BAT *r, int mode, BUN estimate); +BAT *BATthetasubselect(BAT *b, BAT *s, const void *val, const char *op); int BATtopN(BAT *b, BUN topN); BAT *BATundo(BAT *b); BAT *BATuselect(BAT *b, const void *tl, const void *th); @@ -245,8 +246,8 @@ int GDKms(void); int GDKnr_threads; void GDKprotect(void); int GDKprotected; -void GDKqsort(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); -void GDKqsort_rev(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); +void GDKqsort(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); +void GDKqsort_rev(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe); void *GDKrealloc(void *pold, size_t size); void GDKsetenv(str name, str value); ssize_t GDKstrFromStr(unsigned char *dst, const unsigned char *src, ssize_t len); @@ -746,6 +747,8 @@ str ALGtdiff(int *result, int *lid, int str ALGthetajoin(int *result, int *lid, int *rid, int *opc); str ALGthetajoinEstimate(int *result, int *lid, int *rid, int *opc, lng *estimate); str ALGthetaselect(int *result, int *bid, ptr low, str *op); +str ALGthetasubselect1(bat *result, bat *bid, const void *val, const char **op); +str ALGthetasubselect2(bat *result, bat *bid, bat *sid, const void *val, const char **op); str ALGthetauselect(int *result, int *bid, ptr value, str *op); str ALGthsort(int *result, int *lid); str ALGtintersect(int *result, int *lid, int *rid); @@ -1771,60 +1774,6 @@ void MSresetInstructions(MalBlkPtr mb, i void MSresetVariables(Client cntxt, MalBlkPtr mb, MalStkPtr glb, int start); void MSscheduleClient(str command, str challenge, bstream *fin, stream *fout); void MSserveClient(void *dummy); -str MTIMEaccum_date_EQ(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_EQ_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_GE(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_GE_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_GT(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_GT_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_LE(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_LE_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_LT(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_LT_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_NEQ(int *ret, int *d, int *l, int *r); -str MTIMEaccum_date_NEQ_cst(int *ret, int *r, int *l, date *cst); -str MTIMEaccum_date_cst_EQ(int *ret, int *r, date *cst, int *l); -str MTIMEaccum_date_cst_GE(int *ret, int *r, date *cst, int *l); -str MTIMEaccum_date_cst_GT(int *ret, int *r, date *cst, int *l); -str MTIMEaccum_date_cst_LE(int *ret, int *r, date *cst, int *l); -str MTIMEaccum_date_cst_LT(int *ret, int *r, date *cst, int *l); -str MTIMEaccum_date_cst_NEQ(int *ret, int *r,
MonetDB: sciql - sql/parser: fixed compilation after merge with ...
Changeset: 08e8c6b2746f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=08e8c6b2746f Modified Files: sql/server/sql_parser.y Branch: sciql Log Message: sql/parser: fixed compilation after merge with default branch: call yyerror() with extra mvc* argument to comply with changeset d3e0e0e7e4f6 diffs (12 lines): diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -965,7 +965,7 @@ alter_statement: { dlist *l = L(); if ($2 == SQL_ARRAY) { $$ = NULL; - yyerror(\ADD TABLE\ to an array not allowed); + yyerror(m, \ADD TABLE\ to an array not allowed); YYABORT; } append_list(l, $3); ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - modulechk: further simnplified test to limit ...
Changeset: 2999165af85e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2999165af85e Modified Files: monetdb5/modules/mal/Tests/modulechk.mal monetdb5/modules/mal/Tests/modulechk.stable.out Branch: default Log Message: modulechk: further simnplified test to limit output variance diffs (200 lines): diff --git a/monetdb5/modules/mal/Tests/modulechk.mal b/monetdb5/modules/mal/Tests/modulechk.mal --- a/monetdb5/modules/mal/Tests/modulechk.mal +++ b/monetdb5/modules/mal/Tests/modulechk.mal @@ -1,6 +1,8 @@ function test(); -c := mdb.modules(); -mods := algebra.kunique(c); -io.print(mods); +m1 := mdb.modules(); +m2 := algebra.kunique(m1); +m3 := algebra.markH(m2,nil:oid); +m4 := algebra.sortTail(m3); +io.print(m4); end test; test(); diff --git a/monetdb5/modules/mal/Tests/modulechk.stable.out b/monetdb5/modules/mal/Tests/modulechk.stable.out --- a/monetdb5/modules/mal/Tests/modulechk.stable.out +++ b/monetdb5/modules/mal/Tests/modulechk.stable.out @@ -19,9 +19,11 @@ stdout of test 'modulechk` in directory # MonetDB/SQL module loaded # MonetDB/DataCell loaded function user.test():void; -c := mdb.modules(); -mods := algebra.kunique(c); -io.print(mods); +m1 := mdb.modules(); +m2 := algebra.kunique(m1); +m3 := algebra.markH(m2,nil:oid); +m4 := algebra.sortTail(m3); +io.print(m4); end test; function user.main():void; user.test(); @@ -30,86 +32,86 @@ end main; # ht # name # void str # type #-# -[ 0@0, bbp ] -[ 1@0, blob ] -[ 2@0, urlbox] -[ 3@0, sema ] -[ 4@0, recycle ] -[ 5@0, language ] -[ 6@0, aggr ] -[ 7@0, mmath ] -[ 8@0, url ] -[ 9@0, mkey ] -[ 10@0, mal_init ] -[ 11@0, counters ] -[ 12@0, manual] -[ 13@0, mdb ] -[ 14@0, mat ] -[ 15@0, bat5 ] -[ 16@0, zorder] -[ 17@0, opt_sql_append] -[ 18@0, vault ] -[ 19@0, inet ] -[ 20@0, sabaoth ] -[ 21@0, profiler ] -[ 22@0, mal_io] -[ 23@0, iterator ] -[ 24@0, sql ] -[ 25@0, run_isolate ] -[ 26@0, microbenchmark] -[ 27@0, groupby ] -[ 28@0, tokenizer ] -[ 29@0, pqueue] -[ 30@0, remote] -[ 31@0, algebra ] -[ 32@0, batExtensions ] -[ 33@0, xml ] -[ 34@0, jaqlfunc ] -[ 35@0, run_adder ] -[ 36@0, lsst ] -[ 37@0, jaql ] -[ 38@0, batmtime ] -[ 39@0, group ] -[ 40@0, batmmath ] -[ 41@0, json ] -[ 42@0, udf ] -[ 43@0, pcre ] -[ 44@0, fits ] -[ 45@0, streams ] -[ 46@0, mtime ] -[ 47@0, geom ] -[ 48@0, mal_mapi ] -[ 49@0, batstr] -[ 50@0, array ] -[ 51@0, attach] -[ 52@0, identifier] -[ 53@0, const ] -[ 54@0, clients ] -[ 55@0, run_octopus ] -[ 56@0, factories ] -[ 57@0, box ] -[ 58@0, txtsim] -[ 59@0, batxml] -[ 60@0, sample] -[ 61@0, srvpool ] -[ 62@0, cluster ] -[ 63@0, transaction ] -[ 64@0, status] -[ 65@0, mal_compiler ] -[ 66@0, run_memo ] -[ 67@0, color ] -[ 68@0, unix ] -[ 69@0, calc ] -[ 70@0, alarm ] -[ 71@0, logger] -[ 72@0, inspect ] -[ 73@0, batcalc ] -[ 74@0, optimizer ] -[ 75@0, lock ] -[ 76@0, constraints ] -[ 77@0, str ] -[ 78@0, batcolor ] -[ 79@0, trader] +[ nil, aggr ] +[ nil, alarm ] +[ nil, algebra ] +[ nil, array ] +[
MonetDB: xid - Merge with default branch.
Changeset: 3e499fd4a6ad for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e499fd4a6ad Modified Files: monetdb5/modules/mal/Tests/modulechk.mal monetdb5/modules/mal/Tests/modulechk.stable.out Branch: xid Log Message: Merge with default branch. diffs (200 lines): diff --git a/monetdb5/modules/mal/Tests/modulechk.mal b/monetdb5/modules/mal/Tests/modulechk.mal --- a/monetdb5/modules/mal/Tests/modulechk.mal +++ b/monetdb5/modules/mal/Tests/modulechk.mal @@ -1,6 +1,8 @@ function test(); -c := mdb.modules(); -mods := algebra.kunique(c); -io.print(mods); +m1 := mdb.modules(); +m2 := algebra.kunique(m1); +m3 := algebra.markH(m2,nil:oid); +m4 := algebra.sortTail(m3); +io.print(m4); end test; test(); diff --git a/monetdb5/modules/mal/Tests/modulechk.stable.out b/monetdb5/modules/mal/Tests/modulechk.stable.out --- a/monetdb5/modules/mal/Tests/modulechk.stable.out +++ b/monetdb5/modules/mal/Tests/modulechk.stable.out @@ -19,9 +19,11 @@ stdout of test 'modulechk` in directory # MonetDB/SQL module loaded # MonetDB/DataCell loaded function user.test():void; -c := mdb.modules(); -mods := algebra.kunique(c); -io.print(mods); +m1 := mdb.modules(); +m2 := algebra.kunique(m1); +m3 := algebra.markH(m2,nil:oid); +m4 := algebra.sortTail(m3); +io.print(m4); end test; function user.main():void; user.test(); @@ -30,86 +32,86 @@ end main; # ht # name # void str # type #-# -[ 0@0, bbp ] -[ 1@0, blob ] -[ 2@0, urlbox] -[ 3@0, sema ] -[ 4@0, recycle ] -[ 5@0, language ] -[ 6@0, aggr ] -[ 7@0, mmath ] -[ 8@0, url ] -[ 9@0, mkey ] -[ 10@0, mal_init ] -[ 11@0, counters ] -[ 12@0, manual] -[ 13@0, mdb ] -[ 14@0, mat ] -[ 15@0, bat5 ] -[ 16@0, zorder] -[ 17@0, opt_sql_append] -[ 18@0, vault ] -[ 19@0, inet ] -[ 20@0, sabaoth ] -[ 21@0, profiler ] -[ 22@0, mal_io] -[ 23@0, iterator ] -[ 24@0, sql ] -[ 25@0, run_isolate ] -[ 26@0, microbenchmark] -[ 27@0, groupby ] -[ 28@0, tokenizer ] -[ 29@0, pqueue] -[ 30@0, remote] -[ 31@0, algebra ] -[ 32@0, batExtensions ] -[ 33@0, xml ] -[ 34@0, jaqlfunc ] -[ 35@0, run_adder ] -[ 36@0, lsst ] -[ 37@0, jaql ] -[ 38@0, batmtime ] -[ 39@0, group ] -[ 40@0, batmmath ] -[ 41@0, json ] -[ 42@0, udf ] -[ 43@0, pcre ] -[ 44@0, fits ] -[ 45@0, streams ] -[ 46@0, mtime ] -[ 47@0, geom ] -[ 48@0, mal_mapi ] -[ 49@0, batstr] -[ 50@0, array ] -[ 51@0, attach] -[ 52@0, identifier] -[ 53@0, const ] -[ 54@0, clients ] -[ 55@0, run_octopus ] -[ 56@0, factories ] -[ 57@0, box ] -[ 58@0, txtsim] -[ 59@0, batxml] -[ 60@0, sample] -[ 61@0, srvpool ] -[ 62@0, cluster ] -[ 63@0, transaction ] -[ 64@0, status] -[ 65@0, mal_compiler ] -[ 66@0, run_memo ] -[ 67@0, color ] -[ 68@0, unix ] -[ 69@0, calc ] -[ 70@0, alarm ] -[ 71@0, logger] -[ 72@0, inspect ] -[ 73@0, batcalc ] -[ 74@0, optimizer ] -[ 75@0, lock ] -[ 76@0, constraints ] -[ 77@0, str ] -[ 78@0, batcolor ] -[ 79@0, trader] +[ nil, aggr ] +[ nil, alarm ] +[ nil, algebra ] +[ nil, array ] +[ nil, attach] +[ nil,
MonetDB: xid - modulechk: approved xid module
Changeset: 1aef828263f5 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1aef828263f5 Modified Files: monetdb5/modules/mal/Tests/modulechk.stable.out Branch: xid Log Message: modulechk: approved xid module diffs (11 lines): diff --git a/monetdb5/modules/mal/Tests/modulechk.stable.out b/monetdb5/modules/mal/Tests/modulechk.stable.out --- a/monetdb5/modules/mal/Tests/modulechk.stable.out +++ b/monetdb5/modules/mal/Tests/modulechk.stable.out @@ -110,6 +110,7 @@ end main; [ nil, url ] [ nil, urlbox] [ nil, vault ] +[ nil, xid ] [ nil, xml ] [ nil, zorder] ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: sciql - Merge with default branch.
Changeset: c1ea131b3925 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c1ea131b3925 Modified Files: monetdb5/modules/mal/Tests/modulechk.mal monetdb5/modules/mal/Tests/modulechk.stable.out Branch: sciql Log Message: Merge with default branch. diffs (200 lines): diff --git a/monetdb5/modules/mal/Tests/modulechk.mal b/monetdb5/modules/mal/Tests/modulechk.mal --- a/monetdb5/modules/mal/Tests/modulechk.mal +++ b/monetdb5/modules/mal/Tests/modulechk.mal @@ -1,6 +1,8 @@ function test(); -c := mdb.modules(); -mods := algebra.kunique(c); -io.print(mods); +m1 := mdb.modules(); +m2 := algebra.kunique(m1); +m3 := algebra.markH(m2,nil:oid); +m4 := algebra.sortTail(m3); +io.print(m4); end test; test(); diff --git a/monetdb5/modules/mal/Tests/modulechk.stable.out b/monetdb5/modules/mal/Tests/modulechk.stable.out --- a/monetdb5/modules/mal/Tests/modulechk.stable.out +++ b/monetdb5/modules/mal/Tests/modulechk.stable.out @@ -19,9 +19,11 @@ stdout of test 'modulechk` in directory # MonetDB/SQL module loaded # MonetDB/DataCell loaded function user.test():void; -c := mdb.modules(); -mods := algebra.kunique(c); -io.print(mods); +m1 := mdb.modules(); +m2 := algebra.kunique(m1); +m3 := algebra.markH(m2,nil:oid); +m4 := algebra.sortTail(m3); +io.print(m4); end test; function user.main():void; user.test(); @@ -30,86 +32,86 @@ end main; # ht # name # void str # type #-# -[ 0@0, bbp ] -[ 1@0, blob ] -[ 2@0, urlbox] -[ 3@0, sema ] -[ 4@0, recycle ] -[ 5@0, language ] -[ 6@0, aggr ] -[ 7@0, mmath ] -[ 8@0, url ] -[ 9@0, mkey ] -[ 10@0, mal_init ] -[ 11@0, counters ] -[ 12@0, manual] -[ 13@0, mdb ] -[ 14@0, mat ] -[ 15@0, bat5 ] -[ 16@0, zorder] -[ 17@0, opt_sql_append] -[ 18@0, vault ] -[ 19@0, inet ] -[ 20@0, sabaoth ] -[ 21@0, profiler ] -[ 22@0, mal_io] -[ 23@0, iterator ] -[ 24@0, sql ] -[ 25@0, run_isolate ] -[ 26@0, microbenchmark] -[ 27@0, groupby ] -[ 28@0, tokenizer ] -[ 29@0, pqueue] -[ 30@0, remote] -[ 31@0, algebra ] -[ 32@0, batExtensions ] -[ 33@0, xml ] -[ 34@0, jaqlfunc ] -[ 35@0, run_adder ] -[ 36@0, lsst ] -[ 37@0, jaql ] -[ 38@0, batmtime ] -[ 39@0, group ] -[ 40@0, batmmath ] -[ 41@0, json ] -[ 42@0, udf ] -[ 43@0, pcre ] -[ 44@0, fits ] -[ 45@0, streams ] -[ 46@0, mtime ] -[ 47@0, geom ] -[ 48@0, mal_mapi ] -[ 49@0, batstr] -[ 50@0, array ] -[ 51@0, attach] -[ 52@0, identifier] -[ 53@0, const ] -[ 54@0, clients ] -[ 55@0, run_octopus ] -[ 56@0, factories ] -[ 57@0, box ] -[ 58@0, txtsim] -[ 59@0, batxml] -[ 60@0, sample] -[ 61@0, srvpool ] -[ 62@0, cluster ] -[ 63@0, transaction ] -[ 64@0, status] -[ 65@0, mal_compiler ] -[ 66@0, run_memo ] -[ 67@0, color ] -[ 68@0, unix ] -[ 69@0, calc ] -[ 70@0, alarm ] -[ 71@0, logger] -[ 72@0, inspect ] -[ 73@0, batcalc ] -[ 74@0, optimizer ] -[ 75@0, lock ] -[ 76@0, constraints ] -[ 77@0, str ] -[ 78@0, batcolor ] -[ 79@0, trader] +[ nil, aggr ] +[ nil, alarm ] +[ nil, algebra ] +[ nil, array ] +[ nil, attach] +[
MonetDB: sciql - modulechk: approved geotiff module
Changeset: c07fb4bdb5b9 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c07fb4bdb5b9 Modified Files: monetdb5/modules/mal/Tests/modulechk.stable.out Branch: sciql Log Message: modulechk: approved geotiff module diffs (11 lines): diff --git a/monetdb5/modules/mal/Tests/modulechk.stable.out b/monetdb5/modules/mal/Tests/modulechk.stable.out --- a/monetdb5/modules/mal/Tests/modulechk.stable.out +++ b/monetdb5/modules/mal/Tests/modulechk.stable.out @@ -58,6 +58,7 @@ end main; [ nil, factories ] [ nil, fits ] [ nil, geom ] +[ nil, geotiff ] [ nil, group ] [ nil, groupby ] [ nil, identifier] ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: sciql - optimizer: disabled tests that use obsolete arr...
Changeset: 7d838229fb29 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7d838229fb29 Modified Files: monetdb5/optimizer/Tests/All Branch: sciql Log Message: optimizer: disabled tests that use obsolete array.grid() diffs (36 lines): diff --git a/monetdb5/optimizer/Tests/All b/monetdb5/optimizer/Tests/All --- a/monetdb5/optimizer/Tests/All +++ b/monetdb5/optimizer/Tests/All @@ -18,10 +18,11 @@ tst4631 tst4700 tst4701 tst4730 -tst4800 -tst4801 tst4820 -tst4900 +# use obsolete array.grid() +#tst4800 +#tst4801 +#tst4900 qep00 qep01 @@ -80,13 +81,15 @@ CXerror1 #the remainder are snippets used in the reference manual CMexample CRexample -AEexample +# uses obsolete array.grid() +#AEexample ARexample DCexample DCexample2 ESexample FTexample -GCexample +# uses obsolete array.grid() +#GCexample GCexample01 CXexample JPexample ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: xid - OPTxidImplementation(): fixed indenting white s...
Changeset: 32bb93bfe5b1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=32bb93bfe5b1 Modified Files: monetdb5/optimizer/opt_xid.c Branch: xid Log Message: OPTxidImplementation(): fixed indenting white spaces diffs (27 lines): diff --git a/monetdb5/optimizer/opt_xid.c b/monetdb5/optimizer/opt_xid.c --- a/monetdb5/optimizer/opt_xid.c +++ b/monetdb5/optimizer/opt_xid.c @@ -72,15 +72,15 @@ OPTxidImplementation(Client cntxt, MalBl /* compress the result, if at least one column is :oid */ for ( j =0, type= getVarType(mb,getArg(p,j)); j p-retc; j++, type= getVarType(mb,getArg(p,j))) - if ( (getTailType(type) == TYPE_oid || getHeadType(type) == TYPE_oid) alias[getArg(p,j)]==0 ){ - //mnstr_printf(GDKout,#got candidate %d head %d tail %d\n,getArg(p,j), getHeadType(getVarType(mb,getArg(p,j))), getTailType(getVarType(mb,getArg(p,j; - /* don't compress if you immediately eat the result */ - if ( getEndLifespan(span, getArg(p,j)) i + 1) { - q = newStmt(mb,xid,compress); - q= pushArgument(mb,q, getArg(p,j)); - alias [getArg(p,j)] = getArg(q,0); + if ((getTailType(type) == TYPE_oid || getHeadType(type) == TYPE_oid) alias[getArg(p,j)] == 0) { + //mnstr_printf(GDKout,#got candidate %d head %d tail %d\n,getArg(p,j), getHeadType(getVarType(mb,getArg(p,j))), getTailType(getVarType(mb,getArg(p,j; + /* don't compress if you immediately eat the result */ + if (getEndLifespan(span, getArg(p,j)) i + 1) { + q = newStmt(mb,xid,compress); + q= pushArgument(mb,q, getArg(p,j)); + alias [getArg(p,j)] = getArg(q,0); + } } - } } DEBUGoptimizers mnstr_printf(cntxt-fdout,#opt_xid: %d statements removed\n, actions); ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: xid - fixed crashes (segfaults) in OPTxidImplementation():
Changeset: bf23268323e0 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bf23268323e0 Modified Files: monetdb5/optimizer/opt_xid.c Branch: xid Log Message: fixed crashes (segfaults) in OPTxidImplementation(): fixed for() loop code to avoid calling getArg() with illegal argument (index beyond limit), and thus avoid crashes (segfaults). diffs (21 lines): diff --git a/monetdb5/optimizer/opt_xid.c b/monetdb5/optimizer/opt_xid.c --- a/monetdb5/optimizer/opt_xid.c +++ b/monetdb5/optimizer/opt_xid.c @@ -71,7 +71,8 @@ OPTxidImplementation(Client cntxt, MalBl pushInstruction(mb,p); /* compress the result, if at least one column is :oid */ - for ( j =0, type= getVarType(mb,getArg(p,j)); j p-retc; j++, type= getVarType(mb,getArg(p,j))) + for (j = 0 ; j p-retc ; j++) { + type= getVarType(mb,getArg(p,j)); if ((getTailType(type) == TYPE_oid || getHeadType(type) == TYPE_oid) alias[getArg(p,j)] == 0) { //mnstr_printf(GDKout,#got candidate %d head %d tail %d\n,getArg(p,j), getHeadType(getVarType(mb,getArg(p,j))), getTailType(getVarType(mb,getArg(p,j; /* don't compress if you immediately eat the result */ @@ -81,6 +82,7 @@ OPTxidImplementation(Client cntxt, MalBl alias [getArg(p,j)] = getArg(q,0); } } + } } DEBUGoptimizers mnstr_printf(cntxt-fdout,#opt_xid: %d statements removed\n, actions); ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list