MonetDB: default - Approvals. MAL-signatures is a maintenance n...

2014-03-24 Thread Sjoerd Mullender
Changeset: 593a74370029 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=593a74370029
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures_gsl.stable.out
clients/Tests/MAL-signatures_nocfitsio.stable.out
clients/Tests/MAL-signatures_sphinxclient.stable.out
clients/Tests/SQL-dump.stable.out.32bit
clients/Tests/exports.stable.out
Branch: default
Log Message:

Approvals.  MAL-signatures is a maintenance nightmare (as is SQL-dump).


diffs (truncated from 12249 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
@@ -41022,89 +41022,13 @@ command pcre.select(pat:str,strs:bat[:oi
 address PCREselectDef;
 comment Select tuples based on the pattern
 
-command pqueue.dequeue_max(h:bat[:oid,:any_1]):void 
-address PQdequeue_anymax;
-comment Removes top element of the max-pqueue and updates it
-
-command pqueue.dequeue_min(h:bat[:oid,:any_1]):void 
-address PQdequeue_anymin;
-comment Removes top element of the min-pqueue and updates it
-
-command pqueue.dequeue_max(h:bat[:oid,:dbl]):void 
-address PQdequeue_dblmax;
-command pqueue.dequeue_min(h:bat[:oid,:dbl]):void 
-address PQdequeue_fltmin;
-command pqueue.dequeue_max(h:bat[:oid,:flt]):void 
-address PQdequeue_fltmax;
-command pqueue.dequeue_min(h:bat[:oid,:flt]):void 
-address PQdequeue_fltmin;
-command pqueue.dequeue_max(h:bat[:oid,:lng]):void 
-address PQdequeue_lngmax;
-command pqueue.dequeue_min(h:bat[:oid,:lng]):void 
-address PQdequeue_lngmin;
-command pqueue.dequeue_max(h:bat[:oid,:wrd]):void 
-address PQdequeue_wrdmax;
-command pqueue.dequeue_min(h:bat[:oid,:wrd]):void 
-address PQdequeue_wrdmin;
-command pqueue.dequeue_max(h:bat[:oid,:int]):void 
-address PQdequeue_intmax;
-command pqueue.dequeue_min(h:bat[:oid,:int]):void 
-address PQdequeue_intmin;
-command pqueue.dequeue_max(h:bat[:oid,:sht]):void 
-address PQdequeue_shtmax;
-command pqueue.dequeue_min(h:bat[:oid,:sht]):void 
-address PQdequeue_shtmin;
-command pqueue.dequeue_max(h:bat[:oid,:bte]):void 
-address PQdequeue_btemax;
-comment Removes top element of the max-pqueue and updates it
-
-command pqueue.dequeue_min(h:bat[:oid,:bte]):void 
-address PQdequeue_btemin;
-comment Removes top element of the min-pqueue and updates it
-
-pattern pqueue.enqueue_max(h:bat[:oid,:any_1],id:oid,value:any_1):void 
-address PQenqueue_anymax;
-comment Inserts element (oid,any) in the max-pqueue
-
-pattern pqueue.enqueue_min(h:bat[:oid,:any_1],id:oid,value:any_1):void 
-address PQenqueue_anymin;
-comment Inserts element (oid,any) in the min-pqueue
-
-command pqueue.enqueue_max(h:bat[:oid,:dbl],id:oid,value:dbl):void 
-address PQenqueue_dblmax;
-command pqueue.enqueue_min(h:bat[:oid,:dbl],id:oid,value:flt):void 
-address PQenqueue_fltmin;
-command pqueue.enqueue_max(h:bat[:oid,:flt],id:oid,value:flt):void 
-address PQenqueue_fltmax;
-command pqueue.enqueue_min(h:bat[:oid,:flt],id:oid,value:flt):void 
-address PQenqueue_fltmin;
-command pqueue.enqueue_max(h:bat[:oid,:lng],id:oid,value:lng):void 
-address PQenqueue_lngmax;
-command pqueue.enqueue_min(h:bat[:oid,:lng],id:oid,value:lng):void 
-address PQenqueue_lngmin;
-command pqueue.enqueue_max(h:bat[:oid,:wrd],id:oid,value:wrd):void 
-address PQenqueue_wrdmax;
-command pqueue.enqueue_min(h:bat[:oid,:wrd],id:oid,value:wrd):void 
-address PQenqueue_wrdmin;
-command pqueue.enqueue_max(h:bat[:oid,:int],id:oid,value:int):void 
-address PQenqueue_intmax;
-command pqueue.enqueue_min(h:bat[:oid,:int],id:oid,value:int):void 
-address PQenqueue_intmin;
-command pqueue.enqueue_max(h:bat[:oid,:sht],id:oid,value:sht):void 
-address PQenqueue_shtmax;
-command pqueue.enqueue_min(h:bat[:oid,:sht],id:oid,value:sht):void 
-address PQenqueue_shtmin;
-command pqueue.enqueue_max(h:bat[:oid,:bte],id:oid,value:bte):void 
-address PQenqueue_btemax;
-comment Inserts element (oid,bte) in the max-pqueue
-
-command pqueue.enqueue_min(h:bat[:oid,:bte],id:oid,value:bte):void 
-address PQenqueue_btemin;
-comment Inserts element (oid,bte) in the min-pqueue
-
-command pqueue.init(a:bat[:oid,:any_1],maxsize:wrd):bat[:oid,:any_1] 
-address PQinit;
-comment Creates an empty pqueue of bat a's tailtype with maximum size maxsize
+pattern pqueue.topn_max(a:bat[:oid,:any_1],n:wrd,elim:bit):bat[:oid,:oid] 
+address PQtopn_max;
+comment Return the top n elements using a min-pqueue with/without duplicate 
elimination
+
+pattern pqueue.topn_min(a:bat[:oid,:any_1],n:wrd,elim:bit):bat[:oid,:oid] 
+address PQtopn_min;
+comment Return the top n elements using a min-pqueue with/without duplicate 
elimination
 
 command 
pqueue.topn_max(a:bat[:oid,:oid],t:bat[:void,:any_1],n:wrd):bat[:oid,:oid] 
 address PQtopn2_anymax;
@@ -41118,10 +41042,6 @@ command pqueue.topn_max(t:bat[:oid,:any_
 address PQtopn_anymax;
 comment Return the topn elements of the bat t using a 

MonetDB: default - Approve leaks tests.

2014-03-24 Thread Sjoerd Mullender
Changeset: 95cc8e302cec for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=95cc8e302cec
Modified Files:
sql/test/leaks/Tests/check0.stable.out
sql/test/leaks/Tests/check0_nogeom.stable.out
sql/test/leaks/Tests/check1.stable.out
sql/test/leaks/Tests/check1_nogeom.stable.out
sql/test/leaks/Tests/check2.stable.out
sql/test/leaks/Tests/check2_nogeom.stable.out
sql/test/leaks/Tests/check3.stable.out
sql/test/leaks/Tests/check3_nogeom.stable.out
sql/test/leaks/Tests/check4.stable.out
sql/test/leaks/Tests/check4_nogeom.stable.out
sql/test/leaks/Tests/check5.stable.out
sql/test/leaks/Tests/check5_nogeom.stable.out
sql/test/leaks/Tests/drop3.stable.out
sql/test/leaks/Tests/drop3_nogeom.stable.out
sql/test/leaks/Tests/select1.stable.out
sql/test/leaks/Tests/select1_nogeom.stable.out
sql/test/leaks/Tests/select2.stable.out
sql/test/leaks/Tests/select2_nogeom.stable.out
sql/test/leaks/Tests/temp1.stable.out
sql/test/leaks/Tests/temp1_nogeom.stable.out
sql/test/leaks/Tests/temp2.stable.out
sql/test/leaks/Tests/temp2_nogeom.stable.out
sql/test/leaks/Tests/temp3.stable.out
sql/test/leaks/Tests/temp3_nogeom.stable.out
Branch: default
Log Message:

Approve leaks tests.


diffs (truncated from 904 to 300 lines):

diff --git a/sql/test/leaks/Tests/check0.stable.out 
b/sql/test/leaks/Tests/check0.stable.out
--- a/sql/test/leaks/Tests/check0.stable.out
+++ b/sql/test/leaks/Tests/check0.stable.out
@@ -79,7 +79,7 @@ Ready.
 % L1,  L2 # name
 % char,wrd # type
 % 9,   3 # length
-[ transient, 398 ]
+[ transient, 394 ]
 #select 'persistent', count(*) from bbp() as bbp where kind like 'pers%';
 % .L1, .L2 # table_name
 % L1,  L2 # name
diff --git a/sql/test/leaks/Tests/check0_nogeom.stable.out 
b/sql/test/leaks/Tests/check0_nogeom.stable.out
--- a/sql/test/leaks/Tests/check0_nogeom.stable.out
+++ b/sql/test/leaks/Tests/check0_nogeom.stable.out
@@ -79,7 +79,7 @@ Ready.
 % L1,  L2 # name
 % char,wrd # type
 % 9,   3 # length
-[ transient, 394 ]
+[ transient, 390 ]
 #select 'persistent', count(*) from bbp() as bbp where kind like 'pers%';
 % .L1, .L2 # table_name
 % L1,  L2 # name
diff --git a/sql/test/leaks/Tests/check1.stable.out 
b/sql/test/leaks/Tests/check1.stable.out
--- a/sql/test/leaks/Tests/check1.stable.out
+++ b/sql/test/leaks/Tests/check1.stable.out
@@ -41,11 +41,11 @@ Ready.
 [ oid,   bit,  40  ]
 [ oid,   bit,  40  ]
 [ oid,   bit,  286 ]
-[ oid,   bit,  1273]
-[ oid,   bit,  1273]
-[ oid,   bit,  1273]
-[ oid,   bit,  1273]
-[ oid,   bte,  3550]
+[ oid,   bit,  1270]
+[ oid,   bit,  1270]
+[ oid,   bit,  1270]
+[ oid,   bit,  1270]
+[ oid,   bte,  3544]
 [ oid,   int,  0   ]
 [ oid,   int,  0   ]
 [ oid,   int,  0   ]
@@ -99,15 +99,15 @@ Ready.
 [ oid,   int,  286 ]
 [ oid,   int,  286 ]
 [ oid,   int,  286 ]
-[ oid,   int,  1273]
-[ oid,   int,  1273]
-[ oid,   int,  1273]
-[ oid,   int,  1273]
-[ oid,   int,  3550]
-[ oid,   int,  3550]
-[ oid,   int,  3550]
-[ oid,   int,  3550]
-[ oid,   int,  3550]
+[ oid,   int,  1270]
+[ oid,   int,  1270]
+[ oid,   int,  1270]
+[ oid,   int,  1270]
+[ oid,   int,  3544]
+[ oid,   int,  3544]
+[ oid,   int,  3544]
+[ oid,   int,  3544]
+[ oid,   int,  3544]
 [ oid,   lng,  0   ]
 [ oid,   lng,  0   ]
 [ oid,   lng,  0   ]
@@ -188,18 +188,18 @@ Ready.
 [ oid,   str,  286 ]
 [ oid,   str,  286 ]
 [ oid,   str,  286 ]
-[ oid,   str,  1273]
-[ oid,   str,  1273]
-[ oid,   str,  1273]
-[ oid,   str,  3550]
-[ oid,   str,  3550]
+[ oid,   str,  1270]
+[ oid,   str,  1270]
+[ oid,   str,  1270]
+[ oid,   str,  3544]
+[ oid,   str,  3544]
 [ oid,   timestamp,0   ]
 #select 'transient', count(*) from bbp() as bbp where kind like 'tran%';
 % .L1, .L2 # table_name
 % L1,  L2 # name
 % char,wrd # type
 % 9,   3 # length
-[ transient, 177 ]
+[ transient, 173 ]
 #select 'persistent', count(*) from bbp() as bbp where kind like 'pers%';
 % .L1, .L2 # table_name
 % L1,  L2 # name
diff --git a/sql/test/leaks/Tests/check1_nogeom.stable.out 
b/sql/test/leaks/Tests/check1_nogeom.stable.out
--- a/sql/test/leaks/Tests/check1_nogeom.stable.out
+++ b/sql/test/leaks/Tests/check1_nogeom.stable.out
@@ -41,11 +41,11 @@ Ready.
 [ oid,   bit,  40  ]
 [ oid,   bit,  40  ]
 [ oid,   bit,  286 ]
-[ oid,   bit,  1233]
-[ oid,   bit,  1233]
-[ oid,   bit,  1233]
-[ oid,   bit,  

MonetDB: rdf - fix creation of typeAttributesHistogram

2014-03-24 Thread Linnea Passing
Changeset: 6832434de2c2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6832434de2c2
Modified Files:
monetdb5/extras/rdf/rdflabels.c
Branch: rdf
Log Message:

fix creation of typeAttributesHistogram

type values were assigned to the wrong CS because the new csFreqIdx was used 
instead of the old one


diffs (33 lines):

diff --git a/monetdb5/extras/rdf/rdflabels.c b/monetdb5/extras/rdf/rdflabels.c
--- a/monetdb5/extras/rdf/rdflabels.c
+++ b/monetdb5/extras/rdf/rdflabels.c
@@ -967,9 +967,7 @@ void createTypeAttributesHistogram(BAT *
// check if property (*pbt) is a type
for (i = 0; i  typeAttributesCount; ++i) {
if (*pbt == typeAttributesOids[i]) {
-
// prop is a type!
-   csFreqIdx = csIdFreqIdxMap[subjCSMap[*sbt]];
 
// get object
obt = (oid *) BUNtloc(oi, p);
@@ -988,6 +986,7 @@ void createTypeAttributesHistogram(BAT *
// nothing to add to histogram
} else {
// analyze values and add to 
histogram
+   csFreqIdx = 
csIdFreqIdxMap[subjCSMap[curS]]; // get csFreqIdx of last subject

insertLeafsIntoTypeAttributesHistogram(typeValues, typeValuesSize, 
typeAttributesHistogram, typeAttributesHistogramCount, csFreqIdx, curT, 
ontmetaBat, ontclassSet);
typeValuesSize = 0; // reset
}
@@ -1008,7 +1007,10 @@ void createTypeAttributesHistogram(BAT *
}
 
// analyze and add last set of typeValues
-   if (curS != BUN_NONE  typeValuesSize != 0) 
insertLeafsIntoTypeAttributesHistogram(typeValues, typeValuesSize, 
typeAttributesHistogram, typeAttributesHistogramCount, csFreqIdx, curT, 
ontmetaBat, ontclassSet);
+   if (curS != BUN_NONE  typeValuesSize != 0) {
+   csFreqIdx = csIdFreqIdxMap[subjCSMap[curS]]; // get csFreqIdx 
of last subject
+   insertLeafsIntoTypeAttributesHistogram(typeValues, 
typeValuesSize, typeAttributesHistogram, typeAttributesHistogramCount, 
csFreqIdx, curT, ontmetaBat, ontclassSet);
+   }
 
GDKfree(typeValues);
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: rdf - Store type hierarchy for type values

2014-03-24 Thread Linnea Passing
Changeset: da0c1bd43bd3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=da0c1bd43bd3
Modified Files:
monetdb5/extras/rdf/rdflabels.c
monetdb5/extras/rdf/rdflabels.h
Branch: rdf
Log Message:

Store type hierarchy for type values

Suggested by Peter
Instead of storing the leaf value per subject, store the whole hierarchy. By 
doing so, the frequencies are summed up on the more general levels of the 
hierarchy.
For example, 40% Politicians and 50% Athletes in a CS will be representented as 
(90% Thing, 90% Agent, 90% Person, 50% Athlete, 40% Politician), resulting in 
label candidate Person when threshold is set to 80%.


diffs (173 lines):

diff --git a/monetdb5/extras/rdf/rdflabels.c b/monetdb5/extras/rdf/rdflabels.c
--- a/monetdb5/extras/rdf/rdflabels.c
+++ b/monetdb5/extras/rdf/rdflabels.c
@@ -851,47 +851,17 @@ int compareTypeAttributesFreqs (const vo
 #endif
 
 #if USE_TYPE_NAMES
-/* Analyze hierarchy in a list of type values, add all leaf values to the 
histogram. Values that are not present in the hierarchy tree built from the 
ontologies are NOT added to the histogram. */
+/* Add type values to the histogram. Values that are not present in the 
hierarchy tree built from the ontologies are NOT added to the histogram. */
 static
-void insertLeafsIntoTypeAttributesHistogram(oid* typeList, int typeListLength, 
TypeAttributesFreq*** typeAttributesHistogram, int** 
typeAttributesHistogramCount, int csFreqIdx, int type, BAT *ontmetaBat, 
OntClass *ontclassSet) {
-   int i, j, k;
+void insertValuesIntoTypeAttributesHistogram(oid* typeList, int 
typeListLength, TypeAttributesFreq*** typeAttributesHistogram, int** 
typeAttributesHistogramCount, int csFreqIdx, int type, BAT *ontmetaBat) {
+   int i, j;
int fit;
-   char*leaf; // flag whether a type value in 'typeList' is a 
leaf (1) or not (0)
-   BUN pos;
-   OntClasshierarchy;
-
-   // start with: every type value is a leaf
-   leaf = GDKmalloc(sizeof(char) * typeListLength);
-   for (i = 0; i  typeListLength; ++i) leaf[i] = 1;
-
-   // analyze hierarchy
+
for (i = 0; i  typeListLength; ++i) {
-   if (!leaf[i]) continue;
-   pos = BUNfnd(BATmirror(ontmetaBat), typeList[i]);
-   if (pos == BUN_NONE) {
-   // no ontology information for this type value, 
therefore it is not added to the hierarchy
-   leaf[i] = 0;
-   continue;
-   }
-
-   // get hierarchy of this type value
-   hierarchy = ontclassSet[pos];
-
-   // loop over superclasses, set leaf=0
-   for (j = 0; j  hierarchy.numsc; ++j) {
-   for (k = 0; k  typeListLength; ++k) {
-   if (i == k) continue;
-   if (ontclassSet[hierarchy.scIdxes[j]].cOid == 
typeList[k]) {
-   // found superclass at position 'k'
-   leaf[k] = 0;
-   }
-   }
-   }
-   }
-
-   // add all leafs to the histogram
-   for (i = 0; i  typeListLength; ++i) {
-   if (!leaf[i]) continue;
+   BUN pos = BUNfnd(BATmirror(ontmetaBat), typeList[i]);
+   if (pos == BUN_NONE) continue; // no ontology information, 
ignore
+
+   // add to histogram
fit = 0;
for (j = 0; j  typeAttributesHistogramCount[csFreqIdx][type]; 
++j) {
if (typeAttributesHistogram[csFreqIdx][type][j].value 
== typeList[i]) {
@@ -913,13 +883,11 @@ void insertLeafsIntoTypeAttributesHistog

typeAttributesHistogram[csFreqIdx][type][typeAttributesHistogramCount[csFreqIdx][type]
 - 1].freq = 1;
}
}
-
-   GDKfree(leaf);
 }
 
 /* Loop through all subjects to collect frequency statistics for type 
attribute values. */
 static
-void createTypeAttributesHistogram(BAT *sbat, BATiter si, BATiter pi, BATiter 
oi, oid *subjCSMap, CSset *freqCSset, int *csIdFreqIdxMap, int 
typeAttributesCount, TypeAttributesFreq*** typeAttributesHistogram, int** 
typeAttributesHistogramCount, char** typeAttributes, BAT *ontmetaBat, OntClass 
*ontclassSet) {
+void createTypeAttributesHistogram(BAT *sbat, BATiter si, BATiter pi, BATiter 
oi, oid *subjCSMap, CSset *freqCSset, int *csIdFreqIdxMap, int 
typeAttributesCount, TypeAttributesFreq*** typeAttributesHistogram, int** 
typeAttributesHistogramCount, char** typeAttributes, BAT *ontmetaBat) {
// looping, extracting
BUN p, q;
oid *sbt, *obt, *pbt;
@@ -987,7 +955,7 @@ void createTypeAttributesHistogram(BAT *
} else {
// analyze values and add to 

MonetDB: default - Ported tokenizer from rdf branch to default b...

2014-03-24 Thread Sjoerd Mullender
Changeset: 09495d868d13 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09495d868d13
Modified Files:
monetdb5/modules/mal/tokenizer.c
Branch: default
Log Message:

Ported tokenizer from rdf branch to default branch.
Unfortunately it is not possible to graft a changeset, so we just made
a copy of tokenizer.c from changeset 3e4ece2b7085 in the rdf branch.

Still to be done: we need upgrade code since the tokenizer uses
persistent bats that have now been split into two.  These bats can be
recognized by their names.


diffs (truncated from 360 to 300 lines):

diff --git a/monetdb5/modules/mal/tokenizer.c b/monetdb5/modules/mal/tokenizer.c
--- a/monetdb5/modules/mal/tokenizer.c
+++ b/monetdb5/modules/mal/tokenizer.c
@@ -56,7 +56,11 @@
 #define MAX_TKNZR_DEPTH 256
 #define INDEX MAX_TKNZR_DEPTH
 static int tokenDepth = 0;
-static BAT *tokenBAT[MAX_TKNZR_DEPTH + 1];
+//static BAT *tokenBAT[MAX_TKNZR_DEPTH + 1];
+struct {
+   BAT *idx, *val; 
+} tokenBAT[MAX_TKNZR_DEPTH + 1];
+
 static BAT *TRANS = NULL;   /* the catalog of tokenizers */
 static char name[128];
 
@@ -70,16 +74,18 @@ static char name[128];
 #define GET_d(x) ((sht) ((x)  255))
 #define GET_h(x) ((x)  8)
 
-static int prvlocate(BAT* b, oid *prv, str part)
+static int prvlocate(BAT* b, BAT* bidx, oid *prv, str part)
 {
BAT *m = BATmirror(b);
BATiter mi = bat_iterator(m);
+   BATiter biidx = bat_iterator(bidx);
+
BUN p;
if (m-H-hash == NULL)
BAThash(m, 2 * BATcount(m));
HASHloop_str(mi, m-H-hash, p, part)
{
-   if (*((oid *) BUNtail(mi, p)) == *prv) {
+   if (*((oid *) BUNtail(biidx, p)) == *prv) {
*prv = (oid) p;
return TRUE;
}
@@ -107,7 +113,9 @@ TKNZRopen(int *ret, str *in)
}
 
for (depth = 0; depth  MAX_TKNZR_DEPTH; depth++) {
-   tokenBAT[depth] = 0;
+   //tokenBAT[depth] = 0;
+   tokenBAT[depth].idx = 0;
+   tokenBAT[depth].val = 0;
}
tokenDepth = 0;
 
@@ -134,14 +142,17 @@ TKNZRopen(int *ret, str *in)
throw(MAL, tokenizer.open, MAL_MALLOC_FAIL);
BATkey(b, FALSE);
BATseqbase(b, 0);
-   tokenBAT[INDEX] = b;
+   //tokenBAT[INDEX] = b;
+   tokenBAT[INDEX].val = b;
if (BKCsetName(r, (int *) (b-batCacheid), (str *) batname) 
!= MAL_SUCCEED)
throw(MAL, tokenizer.open, OPERATION_FAILED);
if (BKCsetPersistent(r, (int *) (b-batCacheid)) != 
MAL_SUCCEED)
throw(MAL, tokenizer.open, OPERATION_FAILED);
BUNappend(TRANS, batname, FALSE);
} else { /* existing tokenizer */
-   tokenBAT[INDEX] = BATdescriptor(idx);
+   //tokenBAT[INDEX] = BATdescriptor(idx);
+   tokenBAT[INDEX].val = BATdescriptor(idx);
+
BUNappend(TRANS, batname, FALSE);
 
for (depth = 0; depth  MAX_TKNZR_DEPTH; depth++) {
@@ -149,8 +160,17 @@ TKNZRopen(int *ret, str *in)
idx = BBPindex(batname);
if (idx == 0)
break;
-   tokenBAT[depth] = BATdescriptor(idx);
+   tokenBAT[depth].val = BATdescriptor(idx);
BUNappend(TRANS, batname, FALSE);
+
+   //For idx BATs
+   snprintf(batname, 132, %s_idx_%d, name, depth);
+   idx = BBPindex(batname); 
+   if (idx == 0)
+   break;
+   tokenBAT[depth].idx = BATdescriptor(idx);
+   BUNappend(TRANS, batname, FALSE);
+
}
tokenDepth = depth;
}
@@ -171,10 +191,11 @@ TKNZRclose(int *r)
TMsubcommit(TRANS);
 
for (i = 0; i  tokenDepth; i++) {
-   BBPunfix(tokenBAT[i]-batCacheid);
+   BBPunfix(tokenBAT[i].idx-batCacheid);
+   BBPunfix(tokenBAT[i].val-batCacheid);
}
-   BBPunfix(tokenBAT[INDEX]-batCacheid);
-
+   //BBPunfix(tokenBAT[INDEX].idx-batCacheid);
+   BBPunfix(tokenBAT[INDEX].val-batCacheid);
tokenDepth = 0;
 
BBPreclaim(TRANS);
@@ -217,7 +238,8 @@ TKNZRappend(oid *pos, str *s)
str batname;
str parts[MAX_TKNZR_DEPTH];
int i, new, r, depth;
-   BAT *b;
+   BAT *bVal;
+   BAT *bIdx; 
BUN p;
BUN idx = 0;
oid prv = 0;
@@ -242,44 +264,76 @@ TKNZRappend(oid *pos, str *s)
throw(MAL, tokenizer,
ILLEGAL_ARGUMENT input string breaks to too 
many parts);
}
-   if (depth  tokenDepth || tokenBAT[0] == NULL) {
+   if (depth  tokenDepth || tokenBAT[0].val == NULL) {
new = tokenDepth;
for 

MonetDB: Jan2014 - We now compile against geos-3.4.2 on Windows.

2014-03-24 Thread Sjoerd Mullender
Changeset: 94c8e0e0d867 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=94c8e0e0d867
Modified Files:
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
buildtools/ChangeLog.Jan2014
buildtools/doc/windowsbuild.rst
Branch: Jan2014
Log Message:

We now compile against geos-3.4.2 on Windows.


diffs (74 lines):

diff --git a/NT/installer32/MonetDB5-Geom-Module.vdproj 
b/NT/installer32/MonetDB5-Geom-Module.vdproj
--- a/NT/installer32/MonetDB5-Geom-Module.vdproj
+++ b/NT/installer32/MonetDB5-Geom-Module.vdproj
@@ -231,7 +231,7 @@
 }
 
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6C07D912740F414490DD35D5A179D268
 {
-SourcePath = 
8:C:\\Libraries\\geos-3.3.0.win32-vs10\\bin\\geos_c.dll
+SourcePath = 
8:C:\\Libraries\\geos-3.4.2.win32-vs10\\bin\\geos_c.dll
 TargetName = 8:geos_c.dll
 Tag = 8:
 Folder = 8:_4D9CE65EDD774551869CFD46B59B4F9E
diff --git a/NT/installer64/MonetDB5-Geom-Module.vdproj 
b/NT/installer64/MonetDB5-Geom-Module.vdproj
--- a/NT/installer64/MonetDB5-Geom-Module.vdproj
+++ b/NT/installer64/MonetDB5-Geom-Module.vdproj
@@ -231,7 +231,7 @@
 }
 
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6C07D912740F414490DD35D5A179D268
 {
-SourcePath = 
8:C:\\Libraries\\geos-3.3.0.win64-vs10\\bin\\geos_c.dll
+SourcePath = 
8:C:\\Libraries\\geos-3.4.2.win64-vs10\\bin\\geos_c.dll
 TargetName = 8:geos_c.dll
 Tag = 8:
 Folder = 8:_4D9CE65EDD774551869CFD46B59B4F9E
diff --git a/buildtools/ChangeLog.Jan2014 b/buildtools/ChangeLog.Jan2014
--- a/buildtools/ChangeLog.Jan2014
+++ b/buildtools/ChangeLog.Jan2014
@@ -1,3 +1,7 @@
 # ChangeLog file for buildtools
 # This file is updated with Maddlog
 
+* Mon Mar 24 2014 Sjoerd Mullender sjo...@acm.org
+- On Windows we now build the geom module against version 3.4.2 of the
+  geos library.
+
diff --git a/buildtools/doc/windowsbuild.rst b/buildtools/doc/windowsbuild.rst
--- a/buildtools/doc/windowsbuild.rst
+++ b/buildtools/doc/windowsbuild.rst
@@ -372,21 +372,23 @@ in the instructions.
 
 .. The actual commands were::
autogen.bat
-   nmake /f makefile.vc MSCV_VER=1600
+   nmake /f makefile.vc MSVC_VER=1600
+
+.. On Windows64, add WIN64=YES to the nmake command line.
 
 After this, install the library somewhere, e.g. in
-``C:\geos-3.3.0.win32``::
+``C:\geos-3.4.2.win32``::
 
- mkdir C:\geos-3.3.0.win32
- mkdir C:\geos-3.3.0.win32\lib
- mkdir C:\geos-3.3.0.win32\bin
- mkdir C:\geos-3.3.0.win32\include
- mkdir C:\geos-3.3.0.win32\include\geos
- copy src\geos_c_i.lib C:\geos-3.3.0.win32\lib
- copy src\geos_c.dll C:\geos-3.3.0.win32\bin
- copy src\include C:\geos-3.3.0.win32\include
- copy src\include\geos C:\geos-3.3.0.win32\include\geos
- copy capi\geos_c.h C:\geos-3.3.0.win32\include
+ mkdir C:\geos-3.4.2.win32
+ mkdir C:\geos-3.4.2.win32\lib
+ mkdir C:\geos-3.4.2.win32\bin
+ mkdir C:\geos-3.4.2.win32\include
+ mkdir C:\geos-3.4.2.win32\include\geos
+ copy src\geos_c_i.lib C:\geos-3.4.2.win32\lib
+ copy src\geos_c.dll C:\geos-3.4.2.win32\bin
+ copy include C:\geos-3.4.2.win32\include
+ copy include\geos C:\geos-3.4.2.win32\include\geos
+ copy capi\geos_c.h C:\geos-3.4.2.win32\include
 
 __ http://geos.refractions.net/
 __ http://trac.osgeo.org/geos/wiki/BuildingOnWindowsWithNMake
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Jan2014 branch.

2014-03-24 Thread Sjoerd Mullender
Changeset: 9755edaea143 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9755edaea143
Modified Files:
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
buildtools/ChangeLog.Jan2014
buildtools/doc/windowsbuild.rst
clients/mapiclient/tomograph.c
Branch: default
Log Message:

Merge with Jan2014 branch.


diffs (96 lines):

diff --git a/NT/installer32/MonetDB5-Geom-Module.vdproj 
b/NT/installer32/MonetDB5-Geom-Module.vdproj
--- a/NT/installer32/MonetDB5-Geom-Module.vdproj
+++ b/NT/installer32/MonetDB5-Geom-Module.vdproj
@@ -231,7 +231,7 @@
 }
 
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6C07D912740F414490DD35D5A179D268
 {
-SourcePath = 
8:C:\\Libraries\\geos-3.3.0.win32-vs10\\bin\\geos_c.dll
+SourcePath = 
8:C:\\Libraries\\geos-3.4.2.win32-vs10\\bin\\geos_c.dll
 TargetName = 8:geos_c.dll
 Tag = 8:
 Folder = 8:_4D9CE65EDD774551869CFD46B59B4F9E
diff --git a/NT/installer64/MonetDB5-Geom-Module.vdproj 
b/NT/installer64/MonetDB5-Geom-Module.vdproj
--- a/NT/installer64/MonetDB5-Geom-Module.vdproj
+++ b/NT/installer64/MonetDB5-Geom-Module.vdproj
@@ -231,7 +231,7 @@
 }
 
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6C07D912740F414490DD35D5A179D268
 {
-SourcePath = 
8:C:\\Libraries\\geos-3.3.0.win64-vs10\\bin\\geos_c.dll
+SourcePath = 
8:C:\\Libraries\\geos-3.4.2.win64-vs10\\bin\\geos_c.dll
 TargetName = 8:geos_c.dll
 Tag = 8:
 Folder = 8:_4D9CE65EDD774551869CFD46B59B4F9E
diff --git a/buildtools/ChangeLog.Jan2014 b/buildtools/ChangeLog.Jan2014
--- a/buildtools/ChangeLog.Jan2014
+++ b/buildtools/ChangeLog.Jan2014
@@ -1,3 +1,7 @@
 # ChangeLog file for buildtools
 # This file is updated with Maddlog
 
+* Mon Mar 24 2014 Sjoerd Mullender sjo...@acm.org
+- On Windows we now build the geom module against version 3.4.2 of the
+  geos library.
+
diff --git a/buildtools/doc/windowsbuild.rst b/buildtools/doc/windowsbuild.rst
--- a/buildtools/doc/windowsbuild.rst
+++ b/buildtools/doc/windowsbuild.rst
@@ -372,21 +372,23 @@ in the instructions.
 
 .. The actual commands were::
autogen.bat
-   nmake /f makefile.vc MSCV_VER=1600
+   nmake /f makefile.vc MSVC_VER=1600
+
+.. On Windows64, add WIN64=YES to the nmake command line.
 
 After this, install the library somewhere, e.g. in
-``C:\geos-3.3.0.win32``::
+``C:\geos-3.4.2.win32``::
 
- mkdir C:\geos-3.3.0.win32
- mkdir C:\geos-3.3.0.win32\lib
- mkdir C:\geos-3.3.0.win32\bin
- mkdir C:\geos-3.3.0.win32\include
- mkdir C:\geos-3.3.0.win32\include\geos
- copy src\geos_c_i.lib C:\geos-3.3.0.win32\lib
- copy src\geos_c.dll C:\geos-3.3.0.win32\bin
- copy src\include C:\geos-3.3.0.win32\include
- copy src\include\geos C:\geos-3.3.0.win32\include\geos
- copy capi\geos_c.h C:\geos-3.3.0.win32\include
+ mkdir C:\geos-3.4.2.win32
+ mkdir C:\geos-3.4.2.win32\lib
+ mkdir C:\geos-3.4.2.win32\bin
+ mkdir C:\geos-3.4.2.win32\include
+ mkdir C:\geos-3.4.2.win32\include\geos
+ copy src\geos_c_i.lib C:\geos-3.4.2.win32\lib
+ copy src\geos_c.dll C:\geos-3.4.2.win32\bin
+ copy include C:\geos-3.4.2.win32\include
+ copy include\geos C:\geos-3.4.2.win32\include\geos
+ copy capi\geos_c.h C:\geos-3.4.2.win32\include
 
 __ http://geos.refractions.net/
 __ http://trac.osgeo.org/geos/wiki/BuildingOnWindowsWithNMake
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -1005,8 +1005,18 @@ showio(void)
fprintf(gnudata, unset ylabel\n);
fprintf(gnudata, set y2tics in (0, LLFMT.0) nomirror\n, max / beat);
fprintf(gnudata, set y2label \IO per ms\\n);
+#ifdef GNUPLOT_463_BUG_ON_FEDORA_20
+/* this is the original version, but on Fedora 20 with
+ * gnuplot-4.6.3-6.fc20.x86_64 it produces a red background on most of
+ * the page */
fprintf(gnudata, plot \%s.dat\ using 1:(($4+$5)/%d.0) title 
\reads\ with boxes fs solid linecolor rgb \gray\ ,\\\n, (tracefile ? 
scratch : filename), beat);
fprintf(gnudata, \%s.dat\ using 1:($5/%d.0) title \writes\ with 
boxes fs solid linecolor rgb \red\  \n, (tracefile ? scratch : filename), 
beat);
+#else
+/* this is a slightly modified version that produces decent results on
+ * all platforms */
+   fprintf(gnudata, plot \%s.dat\ using 1:(($4+$5)/%d.0) title 
\reads\ with impulses linecolor rgb \gray\ ,\\\n, (tracefile ? scratch : 
filename), beat);
+   fprintf(gnudata, \%s.dat\ using 1:($5/%d.0) title \writes\ with 
impulses linecolor rgb \red\  \n, (tracefile ? scratch : filename), beat);
+#endif
fprintf(gnudata, unset y2label\n);
fprintf(gnudata, unset y2tics\n);
fprintf(gnudata, unset y2range\n);
___
checkin-list mailing list
checkin-list@monetdb.org

MonetDB: rdf - Merge with Linnea's change in rdflabel

2014-03-24 Thread Minh-Duc Pham
Changeset: b346e44b53bf for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b346e44b53bf
Modified Files:
monetdb5/extras/rdf/rdflabels.h
Branch: rdf
Log Message:

Merge with Linnea's change in rdflabel


diffs (13 lines):

diff --git a/monetdb5/extras/rdf/rdflabels.h b/monetdb5/extras/rdf/rdflabels.h
--- a/monetdb5/extras/rdf/rdflabels.h
+++ b/monetdb5/extras/rdf/rdflabels.h
@@ -91,7 +91,8 @@ enum {
 } RULE; 
 
 #define FK_FREQ_THRESHOLD 25   // X % of the targeted subjects have to 
be in this table
-#define TYPE_FREQ_THRESHOLD 30 // X % of the type values have to be 
this value
+//#define TYPE_FREQ_THRESHOLD 30   // X % of the type values have 
to be this value
+#define TYPE_FREQ_THRESHOLD 0  // X % of the type values have to be 
this value
 #define ONTOLOGY_FREQ_THRESHOLD 0.4// similarity threshold for tfidf 
simularity for ontology classes
 
 #define USE_SHORT_NAMES 1  // use getPropNameShort()
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: rdf - Merge with default branch

2014-03-24 Thread Minh-Duc Pham
Changeset: 950bbbc4f462 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=950bbbc4f462
Added Files:
gdk/gdk_system_private.h
geom/sql/Tests/T1.sql
geom/sql/Tests/T10.sql
geom/sql/Tests/T10.stable.err
geom/sql/Tests/T10.stable.out
geom/sql/Tests/T11.sql
geom/sql/Tests/T11.stable.err
geom/sql/Tests/T11.stable.out
geom/sql/Tests/T12.sql
geom/sql/Tests/T12.stable.err
geom/sql/Tests/T12.stable.out
geom/sql/Tests/T13.sql
geom/sql/Tests/T14.sql
geom/sql/Tests/T15.sql
geom/sql/Tests/T16.sql
geom/sql/Tests/T16.stable.err
geom/sql/Tests/T16.stable.out
geom/sql/Tests/T17.sql
geom/sql/Tests/T18.sql
geom/sql/Tests/T19.sql
geom/sql/Tests/T2.sql
geom/sql/Tests/T20.sql
geom/sql/Tests/T21.sql
geom/sql/Tests/T21.stable.err
geom/sql/Tests/T21.stable.out
geom/sql/Tests/T22.sql
geom/sql/Tests/T23.sql
geom/sql/Tests/T24.sql
geom/sql/Tests/T25.sql
geom/sql/Tests/T26.sql
geom/sql/Tests/T26.stable.err
geom/sql/Tests/T26.stable.out
geom/sql/Tests/T27.sql
geom/sql/Tests/T28.sql
geom/sql/Tests/T29.sql
geom/sql/Tests/T3.sql
geom/sql/Tests/T30.sql
geom/sql/Tests/T31.sql
geom/sql/Tests/T32.sql
geom/sql/Tests/T33.sql
geom/sql/Tests/T33.stable.err
geom/sql/Tests/T33.stable.out
geom/sql/Tests/T34.sql
geom/sql/Tests/T35.sql
geom/sql/Tests/T37.sql
geom/sql/Tests/T37.stable.err
geom/sql/Tests/T37.stable.out
geom/sql/Tests/T38.sql
geom/sql/Tests/T38.stable.err
geom/sql/Tests/T38.stable.out
geom/sql/Tests/T39.sql
geom/sql/Tests/T39.stable.err
geom/sql/Tests/T39.stable.out
geom/sql/Tests/T4.sql
geom/sql/Tests/T40.sql
geom/sql/Tests/T40.stable.err
geom/sql/Tests/T40.stable.out
geom/sql/Tests/T41.sql
geom/sql/Tests/T41.stable.err
geom/sql/Tests/T41.stable.out
geom/sql/Tests/T42.sql
geom/sql/Tests/T42.stable.err
geom/sql/Tests/T42.stable.out
geom/sql/Tests/T43.sql
geom/sql/Tests/T44.sql
geom/sql/Tests/T44.stable.err
geom/sql/Tests/T44.stable.out
geom/sql/Tests/T45.sql
geom/sql/Tests/T45.stable.err
geom/sql/Tests/T45.stable.out
geom/sql/Tests/T46.sql
geom/sql/Tests/T46.stable.err
geom/sql/Tests/T46.stable.out
geom/sql/Tests/T47.sql
geom/sql/Tests/T47.stable.err
geom/sql/Tests/T47.stable.out
geom/sql/Tests/T48.sql
geom/sql/Tests/T48.stable.err
geom/sql/Tests/T48.stable.out
geom/sql/Tests/T49.sql
geom/sql/Tests/T5.sql
geom/sql/Tests/T5.stable.err
geom/sql/Tests/T5.stable.out
geom/sql/Tests/T50.sql
geom/sql/Tests/T50.stable.err
geom/sql/Tests/T50.stable.out
geom/sql/Tests/T51.sql
geom/sql/Tests/T51.stable.err
geom/sql/Tests/T51.stable.out
geom/sql/Tests/T52.sql
geom/sql/Tests/T52.stable.err
geom/sql/Tests/T52.stable.out
geom/sql/Tests/T6.sql
geom/sql/Tests/T6.stable.err
geom/sql/Tests/T6.stable.out
geom/sql/Tests/T7.sql
geom/sql/Tests/T8.sql
geom/sql/Tests/T8.stable.err
geom/sql/Tests/T8.stable.out
geom/sql/Tests/T9.sql
geom/sql/Tests/ogc_conformance.sql
geom/sql/Tests/ogc_conformance.stable.err
geom/sql/Tests/ogc_conformance.stable.out
geom/sql/Tests/ogc_destroy.stable.err
geom/sql/Tests/ogc_destroy.stable.out
geom/sql/Tests/ogc_dropconformance.sql
geom/sql/Tests/ogc_dropconformance.stable.err
geom/sql/Tests/ogc_dropconformance.stable.out
geom/sql/Tests/ogc_load.stable.err
geom/sql/Tests/ogc_load.stable.out
geom/sql/Tests/ogc_test.stable.err
geom/sql/Tests/ogc_test.stable.out
Modified Files:
.hgtags
HowToStart.rst
MonetDB.spec
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer32/cv64-32.sh
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
NT/installer64/cv32-64.sh
NT/monetdb_config.h.in
NT/rules.msc
bootstrap
clients/R/MonetDB.R/DESCRIPTION
clients/R/MonetDB.R/NAMESPACE
clients/R/MonetDB.R/NEWS
clients/R/MonetDB.R/R/control.R
clients/R/MonetDB.R/R/monetdb.R
clients/R/db.tests/sqlsurvey.test.R
clients/Tests/exports.stable.out
clients/mapiclient/dump.c
clients/mapiclient/mclient.c

MonetDB: rdf - Using ontology-based rdf:type value in basic CS e...

2014-03-24 Thread Minh-Duc Pham
Changeset: 7286c4e26588 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7286c4e26588
Modified Files:
monetdb5/extras/rdf/rdflabels.c
monetdb5/extras/rdf/rdflabels.h
monetdb5/extras/rdf/rdfschema.c
monetdb5/extras/rdf/rdfschema.h
Branch: rdf
Log Message:

Using ontology-based rdf:type value in basic CS exploration.

- Use only one rdf type value which is the most specific ontology-based value 
in order to identify CS.


diffs (truncated from 618 to 300 lines):

diff --git a/monetdb5/extras/rdf/rdflabels.c b/monetdb5/extras/rdf/rdflabels.c
--- a/monetdb5/extras/rdf/rdflabels.c
+++ b/monetdb5/extras/rdf/rdflabels.c
@@ -2690,29 +2690,32 @@ void freeOntologyLookupResult(oid** onto
free(ontologyLookupResult);
 }
 
+#if USE_TYPE_NAMES
+char*  typeAttributes[] = {
+   http://ogp.me/ns#type,
+   https://ogp.me/ns#type,
+   http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
+   http://purl.org/dc/elements/1.1/type,
+   http://mixi-platform.com/ns#type,
+   http://ogp.me/ns/fb#type,
+   http://opengraph.org/schema/type,
+   http://opengraphprotocol.org/schema/type,
+   http://purl.org/dc/terms/type,
+   http://purl.org/goodrelations/v1#typeOfGood,
+   http://search.yahoo.com/searchmonkey/media/type,
+   https://opengraphprotocol.org/schema/type,
+   https://search.yahoo.com/searchmonkey/media/type,
+   http://www.w3.org/1999/xhtmltype,
+   http://dbpedia.org/ontology/longtype,
+   http://dbpedia.org/ontology/type,
+   http://dbpedia.org/ontology/typeOfElectrification}; 
// ... necessary to get the correct oids
+
+inttypeAttributesCount = 17;
+#endif
+
 /* Creates labels for all CS (without a parent). */
 CSlabel* createLabels(CSset* freqCSset, CSrel* csrelSet, int num, BAT *sbat, 
BATiter si, BATiter pi, BATiter oi, oid *subjCSMap, int *csIdFreqIdxMap, oid** 
ontattributes, int ontattributesCount, oid** ontmetadata, int ontmetadataCount, 
OntoUsageNode** ontoUsageTree, BAT *ontmetaBat, OntClass *ontclassSet) {
-#if USE_TYPE_NAMES
-   char*   typeAttributes[] = {
-   http://ogp.me/ns#type,
-   https://ogp.me/ns#type,
-   
http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-   http://purl.org/dc/elements/1.1/type,
-   http://mixi-platform.com/ns#type,
-   http://ogp.me/ns/fb#type,
-   http://opengraph.org/schema/type,
-   http://opengraphprotocol.org/schema/type,
-   http://purl.org/dc/terms/type,
-   http://purl.org/goodrelations/v1#typeOfGood,
-   
http://search.yahoo.com/searchmonkey/media/type,
-   https://opengraphprotocol.org/schema/type,
-   
https://search.yahoo.com/searchmonkey/media/type,
-   http://www.w3.org/1999/xhtmltype,
-   http://dbpedia.org/ontology/longtype,
-   http://dbpedia.org/ontology/type,
-   
http://dbpedia.org/ontology/typeOfElectrification}; // ... necessary to 
get the correct oids
-#endif
-   int typeAttributesCount = 17;
+
int **typeAttributesHistogramCount;
TypeAttributesFreq  ***typeAttributesHistogram;
TypeStat*typeStat = NULL;
diff --git a/monetdb5/extras/rdf/rdflabels.h b/monetdb5/extras/rdf/rdflabels.h
--- a/monetdb5/extras/rdf/rdflabels.h
+++ b/monetdb5/extras/rdf/rdflabels.h
@@ -127,4 +127,9 @@ freeOntoUsageTree(OntoUsageNode* tree);
 rdf_export void
 printListOntology(void);
 
+#if USE_TYPE_NAMES
+extern char*   typeAttributes[];
+extern int typeAttributesCount; 
+#endif
+
 #endif /* _RDFLABELS_H_ */
diff --git a/monetdb5/extras/rdf/rdfschema.c b/monetdb5/extras/rdf/rdfschema.c
--- a/monetdb5/extras/rdf/rdfschema.c
+++ b/monetdb5/extras/rdf/rdfschema.c
@@ -1253,6 +1253,10 @@ void freeCSset(CSset *csSet){
free(csSet-items[i].lstPropSupport);
#endif
free(csSet-items[i].lstConsistsOf);
+   #if EXTRAINFO_FROM_RDFTYPE
+   if (csSet-items[i].typevalues != NULL) 
+   free(csSet-items[i].typevalues); 
+   #endif
}
 
#if STOREFULLCS
@@ -1274,6 +1278,9 @@ void freemergeCSset(mergeCSset *csSet){
for(i = 0; i  csSet-nummergeCSadded; i ++){

MonetDB: rdf - Merge with Linnea changes in rdflabel

2014-03-24 Thread Minh-Duc Pham
Changeset: 944815cdd7d6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=944815cdd7d6
Modified Files:
monetdb5/extras/rdf/rdflabels.c
monetdb5/extras/rdf/rdflabels.h
Branch: rdf
Log Message:

Merge with Linnea changes in rdflabel


diffs (188 lines):

diff --git a/monetdb5/extras/rdf/rdflabels.c b/monetdb5/extras/rdf/rdflabels.c
--- a/monetdb5/extras/rdf/rdflabels.c
+++ b/monetdb5/extras/rdf/rdflabels.c
@@ -851,47 +851,17 @@ int compareTypeAttributesFreqs (const vo
 #endif
 
 #if USE_TYPE_NAMES
-/* Analyze hierarchy in a list of type values, add all leaf values to the 
histogram. Values that are not present in the hierarchy tree built from the 
ontologies are NOT added to the histogram. */
+/* Add type values to the histogram. Values that are not present in the 
hierarchy tree built from the ontologies are NOT added to the histogram. */
 static
-void insertLeafsIntoTypeAttributesHistogram(oid* typeList, int typeListLength, 
TypeAttributesFreq*** typeAttributesHistogram, int** 
typeAttributesHistogramCount, int csFreqIdx, int type, BAT *ontmetaBat, 
OntClass *ontclassSet) {
-   int i, j, k;
+void insertValuesIntoTypeAttributesHistogram(oid* typeList, int 
typeListLength, TypeAttributesFreq*** typeAttributesHistogram, int** 
typeAttributesHistogramCount, int csFreqIdx, int type, BAT *ontmetaBat) {
+   int i, j;
int fit;
-   char*leaf; // flag whether a type value in 'typeList' is a 
leaf (1) or not (0)
-   BUN pos;
-   OntClasshierarchy;
-
-   // start with: every type value is a leaf
-   leaf = GDKmalloc(sizeof(char) * typeListLength);
-   for (i = 0; i  typeListLength; ++i) leaf[i] = 1;
-
-   // analyze hierarchy
+
for (i = 0; i  typeListLength; ++i) {
-   if (!leaf[i]) continue;
-   pos = BUNfnd(BATmirror(ontmetaBat), typeList[i]);
-   if (pos == BUN_NONE) {
-   // no ontology information for this type value, 
therefore it is not added to the hierarchy
-   leaf[i] = 0;
-   continue;
-   }
-
-   // get hierarchy of this type value
-   hierarchy = ontclassSet[pos];
-
-   // loop over superclasses, set leaf=0
-   for (j = 0; j  hierarchy.numsc; ++j) {
-   for (k = 0; k  typeListLength; ++k) {
-   if (i == k) continue;
-   if (ontclassSet[hierarchy.scIdxes[j]].cOid == 
typeList[k]) {
-   // found superclass at position 'k'
-   leaf[k] = 0;
-   }
-   }
-   }
-   }
-
-   // add all leafs to the histogram
-   for (i = 0; i  typeListLength; ++i) {
-   if (!leaf[i]) continue;
+   BUN pos = BUNfnd(BATmirror(ontmetaBat), typeList[i]);
+   if (pos == BUN_NONE) continue; // no ontology information, 
ignore
+
+   // add to histogram
fit = 0;
for (j = 0; j  typeAttributesHistogramCount[csFreqIdx][type]; 
++j) {
if (typeAttributesHistogram[csFreqIdx][type][j].value 
== typeList[i]) {
@@ -913,13 +883,11 @@ void insertLeafsIntoTypeAttributesHistog

typeAttributesHistogram[csFreqIdx][type][typeAttributesHistogramCount[csFreqIdx][type]
 - 1].freq = 1;
}
}
-
-   GDKfree(leaf);
 }
 
 /* Loop through all subjects to collect frequency statistics for type 
attribute values. */
 static
-void createTypeAttributesHistogram(BAT *sbat, BATiter si, BATiter pi, BATiter 
oi, oid *subjCSMap, CSset *freqCSset, int *csIdFreqIdxMap, int 
typeAttributesCount, TypeAttributesFreq*** typeAttributesHistogram, int** 
typeAttributesHistogramCount, char** typeAttributes, BAT *ontmetaBat, OntClass 
*ontclassSet) {
+void createTypeAttributesHistogram(BAT *sbat, BATiter si, BATiter pi, BATiter 
oi, oid *subjCSMap, CSset *freqCSset, int *csIdFreqIdxMap, int 
typeAttributesCount, TypeAttributesFreq*** typeAttributesHistogram, int** 
typeAttributesHistogramCount, char** typeAttributes, BAT *ontmetaBat) {
// looping, extracting
BUN p, q;
oid *sbt, *obt, *pbt;
@@ -967,9 +935,7 @@ void createTypeAttributesHistogram(BAT *
// check if property (*pbt) is a type
for (i = 0; i  typeAttributesCount; ++i) {
if (*pbt == typeAttributesOids[i]) {
-
// prop is a type!
-   csFreqIdx = csIdFreqIdxMap[subjCSMap[*sbt]];
 
// get object
obt = (oid *) BUNtloc(oi, p);
@@ -988,7 +954,8 @@ void createTypeAttributesHistogram(BAT *

MonetDB: default - Approved output.

2014-03-24 Thread Sjoerd Mullender
Changeset: ceece173e5d4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ceece173e5d4
Modified Files:

monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.err.Windows

monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows
Branch: default
Log Message:

Approved output.


diffs (49 lines):

diff --git 
a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.err.Windows
 
b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.err.Windows
--- 
a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.err.Windows
+++ 
b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.err.Windows
@@ -30,16 +30,16 @@ stderr of test 'opt_sql_append` in direc
 # 22:58:57   mclient -lsql -ftest -Eutf-8 -i -e --host=rome 
--port=36275
 # 22:58:57   
 
-MAPI  = (monetdb) /var/tmp/mtest-11972/.s.monetdb.36131
+MAPI  = monetdb@LAB03:37903
 QUERY = explain copy into ttt from '/tmp/xyz';
 ERROR = !COPY INTO: filename must have absolute path: /tmp/xyz
-MAPI  = (monetdb) /var/tmp/mtest-11972/.s.monetdb.36131
+MAPI  = monetdb@LAB03:37903
 QUERY = explain copy into ttt from '\tmp/xyz';
 ERROR = !COPY INTO: filename must have absolute path: \tmp/xyz
-MAPI  = (monetdb) /var/tmp/mtest-11972/.s.monetdb.36131
+MAPI  = monetdb@LAB03:37903
 QUERY = explain copy into ttt from '/tmp/xyz';
 ERROR = !COPY INTO: filename must have absolute path: /tmp/xyz
-MAPI  = (monetdb) /var/tmp/mtest-11972/.s.monetdb.36131
+MAPI  = monetdb@LAB03:37903
 QUERY = explain copy into ttt from '\tmp/xyz';
 ERROR = !COPY INTO: filename must have absolute path: \tmp/xyz
 
diff --git 
a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows
 
b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows
--- 
a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows
+++ 
b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows
@@ -55,8 +55,8 @@ Ready.
 % .L # table_name
 % def # name
 % clob # type
-% 467 # length
-[ 
optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptySet();optimizer.aliases();optimizer.pushselect();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.commonTerms();optimizer.groups();optimizer.joinPath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.garbageCollector();
]
+% 448 # length
+[ 
optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptySet();optimizer.aliases();optimizer.pushselect();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.commonTerms();optimizer.joinPath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.garbageCollector();
   ]
 #explain copy into ttt from 'a:\tmp/xyz';
 % .explain # table_name
 % mal # name
@@ -89,8 +89,8 @@ end s4_1;
 % .L # table_name
 % def # name
 % clob # type
-% 490 # length
-[ 
optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptySet();optimizer.aliases();optimizer.pushselect();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.commonTerms();optimizer.groups();optimizer.joinPath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.sql_append();optimizer.garbageCollector();
 ]
+% 471 # length
+[ 
optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptySet();optimizer.aliases();optimizer.pushselect();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.commonTerms();optimizer.joinPath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.sql_append();optimizer.garbageCollector();
]
 #explain copy into ttt from 'Z:/tmp/xyz';
 % .explain # table_name
 % mal # name
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Deleted commented out old code.

2014-03-24 Thread Sjoerd Mullender
Changeset: 97ea84b32476 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=97ea84b32476
Modified Files:
monetdb5/modules/mal/tokenizer.c
Branch: default
Log Message:

Deleted commented out old code.


diffs (78 lines):

diff --git a/monetdb5/modules/mal/tokenizer.c b/monetdb5/modules/mal/tokenizer.c
--- a/monetdb5/modules/mal/tokenizer.c
+++ b/monetdb5/modules/mal/tokenizer.c
@@ -56,7 +56,6 @@
 #define MAX_TKNZR_DEPTH 256
 #define INDEX MAX_TKNZR_DEPTH
 static int tokenDepth = 0;
-//static BAT *tokenBAT[MAX_TKNZR_DEPTH + 1];
 struct {
BAT *idx, *val; 
 } tokenBAT[MAX_TKNZR_DEPTH + 1];
@@ -113,7 +112,6 @@ TKNZRopen(int *ret, str *in)
}
 
for (depth = 0; depth  MAX_TKNZR_DEPTH; depth++) {
-   //tokenBAT[depth] = 0;
tokenBAT[depth].idx = 0;
tokenBAT[depth].val = 0;
}
@@ -142,7 +140,6 @@ TKNZRopen(int *ret, str *in)
throw(MAL, tokenizer.open, MAL_MALLOC_FAIL);
BATkey(b, FALSE);
BATseqbase(b, 0);
-   //tokenBAT[INDEX] = b;
tokenBAT[INDEX].val = b;
if (BKCsetName(r, (int *) (b-batCacheid), (str *) batname) 
!= MAL_SUCCEED)
throw(MAL, tokenizer.open, OPERATION_FAILED);
@@ -150,7 +147,6 @@ TKNZRopen(int *ret, str *in)
throw(MAL, tokenizer.open, OPERATION_FAILED);
BUNappend(TRANS, batname, FALSE);
} else { /* existing tokenizer */
-   //tokenBAT[INDEX] = BATdescriptor(idx);
tokenBAT[INDEX].val = BATdescriptor(idx);
 
BUNappend(TRANS, batname, FALSE);
@@ -163,7 +159,7 @@ TKNZRopen(int *ret, str *in)
tokenBAT[depth].val = BATdescriptor(idx);
BUNappend(TRANS, batname, FALSE);
 
-   //For idx BATs
+   /* For idx BATs */
snprintf(batname, 132, %s_idx_%d, name, depth);
idx = BBPindex(batname); 
if (idx == 0)
@@ -194,7 +190,6 @@ TKNZRclose(int *r)
BBPunfix(tokenBAT[i].idx-batCacheid);
BBPunfix(tokenBAT[i].val-batCacheid);
}
-   //BBPunfix(tokenBAT[INDEX].idx-batCacheid);
BBPunfix(tokenBAT[INDEX].val-batCacheid);
tokenDepth = 0;
 
@@ -345,7 +340,7 @@ TKNZRappend(oid *pos, str *s)
*pos = BUNfnd(BATmirror(tokenBAT[INDEX].val), (ptr)  comp);
if (*pos != BUN_NONE) {
/* the string is already there */
-   //printf(The string %s is already there,url);
+   /* printf(The string %s is already there,url); */
GDKfree(url);
return MAL_SUCCEED;
}
@@ -520,7 +515,7 @@ takeOid(oid id, str *val)
str parts[MAX_TKNZR_DEPTH];
size_t lngth = 0;
str s;
-   BATiter biidx; //Iterator for index bat
+   BATiter biidx; /* Iterator for index bat */
 
if (id = BATcount(tokenBAT[INDEX].val)) {
throw(MAL, tokenizer.takeOid, OPERATION_FAILED  illegal 
oid);
@@ -592,7 +587,6 @@ TKNZRgetLevel(int *r, int *level)
if (*level  0 || *level = tokenDepth)
throw(MAL, tokenizer.getLevel, OPERATION_FAILED  illegal 
level);
view = VIEWcreate(BATmirror(tokenBAT[*level].idx),tokenBAT[*level].val);
-   //*r = tokenBAT[*level].val-batCacheid;
*r = view-batCacheid;
 
BBPincref(*r, TRUE);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: multifarm - Merge with default branch.

2014-03-24 Thread Sjoerd Mullender
Changeset: d358b2bc57f9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d358b2bc57f9
Added Files:
geom/sql/Tests/T1.modules
geom/sql/Tests/T1.reqtests
geom/sql/Tests/T1.stable.err
geom/sql/Tests/T1.stable.out
geom/sql/Tests/T10.modules
geom/sql/Tests/T10.reqtests
geom/sql/Tests/T11.modules
geom/sql/Tests/T11.reqtests
geom/sql/Tests/T12.modules
geom/sql/Tests/T12.reqtests
geom/sql/Tests/T13.modules
geom/sql/Tests/T13.reqtests
geom/sql/Tests/T13.stable.err
geom/sql/Tests/T13.stable.out
geom/sql/Tests/T14.modules
geom/sql/Tests/T14.reqtests
geom/sql/Tests/T14.stable.err
geom/sql/Tests/T14.stable.out
geom/sql/Tests/T15.modules
geom/sql/Tests/T15.reqtests
geom/sql/Tests/T15.stable.err
geom/sql/Tests/T15.stable.out
geom/sql/Tests/T16.modules
geom/sql/Tests/T16.reqtests
geom/sql/Tests/T17.modules
geom/sql/Tests/T17.reqtests
geom/sql/Tests/T17.stable.err
geom/sql/Tests/T17.stable.out
geom/sql/Tests/T18.modules
geom/sql/Tests/T18.reqtests
geom/sql/Tests/T18.stable.err
geom/sql/Tests/T18.stable.out
geom/sql/Tests/T19.modules
geom/sql/Tests/T19.reqtests
geom/sql/Tests/T19.stable.err
geom/sql/Tests/T19.stable.out
geom/sql/Tests/T2.modules
geom/sql/Tests/T2.reqtests
geom/sql/Tests/T2.stable.err
geom/sql/Tests/T2.stable.out
geom/sql/Tests/T20.modules
geom/sql/Tests/T20.reqtests
geom/sql/Tests/T20.stable.err
geom/sql/Tests/T20.stable.out
geom/sql/Tests/T21.modules
geom/sql/Tests/T21.reqtests
geom/sql/Tests/T22.modules
geom/sql/Tests/T22.reqtests
geom/sql/Tests/T22.stable.err
geom/sql/Tests/T22.stable.out
geom/sql/Tests/T23.modules
geom/sql/Tests/T23.reqtests
geom/sql/Tests/T23.stable.err
geom/sql/Tests/T23.stable.out
geom/sql/Tests/T24.modules
geom/sql/Tests/T24.reqtests
geom/sql/Tests/T24.stable.err
geom/sql/Tests/T24.stable.out
geom/sql/Tests/T25.modules
geom/sql/Tests/T25.reqtests
geom/sql/Tests/T25.stable.err
geom/sql/Tests/T25.stable.out
geom/sql/Tests/T26.modules
geom/sql/Tests/T26.reqtests
geom/sql/Tests/T27.modules
geom/sql/Tests/T27.reqtests
geom/sql/Tests/T27.stable.err
geom/sql/Tests/T27.stable.out
geom/sql/Tests/T28.modules
geom/sql/Tests/T28.reqtests
geom/sql/Tests/T28.stable.err
geom/sql/Tests/T28.stable.out
geom/sql/Tests/T29.modules
geom/sql/Tests/T29.reqtests
geom/sql/Tests/T29.stable.err
geom/sql/Tests/T29.stable.out
geom/sql/Tests/T3.modules
geom/sql/Tests/T3.reqtests
geom/sql/Tests/T3.stable.err
geom/sql/Tests/T3.stable.out
geom/sql/Tests/T30.modules
geom/sql/Tests/T30.reqtests
geom/sql/Tests/T30.stable.err
geom/sql/Tests/T30.stable.out
geom/sql/Tests/T31.modules
geom/sql/Tests/T31.reqtests
geom/sql/Tests/T31.stable.err
geom/sql/Tests/T31.stable.out
geom/sql/Tests/T32.modules
geom/sql/Tests/T32.reqtests
geom/sql/Tests/T32.stable.err
geom/sql/Tests/T32.stable.out
geom/sql/Tests/T33.modules
geom/sql/Tests/T33.reqtests
geom/sql/Tests/T34.modules
geom/sql/Tests/T34.reqtests
geom/sql/Tests/T34.stable.err
geom/sql/Tests/T34.stable.out
geom/sql/Tests/T35.modules
geom/sql/Tests/T35.reqtests
geom/sql/Tests/T35.stable.err
geom/sql/Tests/T35.stable.out
geom/sql/Tests/T36.modules
geom/sql/Tests/T36.reqtests
geom/sql/Tests/T36.sql
geom/sql/Tests/T36.stable.err
geom/sql/Tests/T36.stable.out
geom/sql/Tests/T37.modules
geom/sql/Tests/T37.reqtests
geom/sql/Tests/T38.modules
geom/sql/Tests/T38.reqtests
geom/sql/Tests/T39.modules
geom/sql/Tests/T39.reqtests
geom/sql/Tests/T4.modules
geom/sql/Tests/T4.reqtests
geom/sql/Tests/T4.stable.err
geom/sql/Tests/T4.stable.out
geom/sql/Tests/T40.modules
geom/sql/Tests/T40.reqtests
geom/sql/Tests/T41.modules
geom/sql/Tests/T41.reqtests
geom/sql/Tests/T42.modules
geom/sql/Tests/T42.reqtests
geom/sql/Tests/T43.modules
geom/sql/Tests/T43.reqtests
geom/sql/Tests/T43.stable.err
geom/sql/Tests/T43.stable.out
geom/sql/Tests/T44.modules
geom/sql/Tests/T44.reqtests
geom/sql/Tests/T45.modules
geom/sql/Tests/T45.reqtests
geom/sql/Tests/T46.modules
geom/sql/Tests/T46.reqtests
geom/sql/Tests/T47.modules

MonetDB: Jan2014 - Checkpoint commit of datacell

2014-03-24 Thread Martin Kersten
Changeset: 347d14bebba2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=347d14bebba2
Modified Files:
sql/backends/monet5/datacell/50_datacell.sql
sql/backends/monet5/datacell/Tests/datacell00.stable.err
sql/backends/monet5/datacell/Tests/datacell00.stable.out
sql/backends/monet5/datacell/Tests/dctemper00.stable.err
sql/backends/monet5/datacell/Tests/dctemper00.stable.out
sql/backends/monet5/datacell/Tests/scenario01.stable.out
sql/backends/monet5/datacell/Tests/scenario02.stable.out
sql/backends/monet5/datacell/Tests/scenario04.stable.out
sql/backends/monet5/datacell/Tests/scenario05.stable.out
sql/backends/monet5/datacell/Tests/scenario06.stable.err
sql/backends/monet5/datacell/Tests/scenario06.stable.out
sql/backends/monet5/datacell/datacell.c
sql/backends/monet5/datacell/datacell.h
sql/backends/monet5/datacell/datacell.mal
sql/backends/monet5/datacell/dcsocket.c
sql/backends/monet5/datacell/emitter.c
sql/backends/monet5/datacell/petrinet.c
sql/backends/monet5/datacell/receptor.c
sql/backends/monet5/datacell/sensor.c
sql/backends/monet5/sql_scenario.c
Branch: Jan2014
Log Message:

Checkpoint commit of datacell
Fixed a number of errors in the code base related to thread handling
and made sure a number of tests now can be ran.
open issue:
- SQL compilation issues in dcload.sql
- SQL environment initialization in basket00.mal


diffs (truncated from 896 to 300 lines):

diff --git a/sql/backends/monet5/datacell/50_datacell.sql 
b/sql/backends/monet5/datacell/50_datacell.sql
--- a/sql/backends/monet5/datacell/50_datacell.sql
+++ b/sql/backends/monet5/datacell/50_datacell.sql
@@ -69,18 +69,34 @@ create function datacell.threshold(bskt 
 returns boolean
external name datacell.threshold;
 
+create function datacell.window(bskt string, size tinyint, stride tinyint)
+returns boolean
+   external name datacell.window;
+
 create function datacell.window(bskt string, size integer, stride integer)
 returns boolean
external name datacell.window;
 
+create function datacell.window(bskt string, size bigint, stride bigint)
+returns boolean
+   external name datacell.window;
+
 create function datacell.window(bskt string, size interval second, stride 
interval second)
 returns boolean
external name datacell.timewindow;
 
+create function datacell.beat(bskt string, t tinyint)
+returns boolean
+   external name datacell.beat;
+
 create function datacell.beat(bskt string, t integer)
 returns boolean
external name datacell.beat;
 
+create function datacell.beat(bskt string, t bigint)
+returns boolean
+   external name datacell.beat;
+
 -- Inspection tables
 
 create function datacell.baskets()
diff --git a/sql/backends/monet5/datacell/Tests/datacell00.stable.err 
b/sql/backends/monet5/datacell/Tests/datacell00.stable.err
--- a/sql/backends/monet5/datacell/Tests/datacell00.stable.err
+++ b/sql/backends/monet5/datacell/Tests/datacell00.stable.err
@@ -1,15 +1,13 @@
 stderr of test 'datacell00` in directory 'sql/backends/monet5/datacell` itself:
 
 
-# 16:53:52   
-# 16:53:52mserver5  --debug=10 --set gdk_nr_threads=0  --set 
gdk_dbfarm=/net/rig.ins.cwi.nl/export/scratch0/manegold/Monet/HG/Aug2011/prefix/--enable-datacell_--disable-debug_--enable-optimize_--disable-assert/var/MonetDB
 --set mapi_open=true --set mapi_port=39463 --set monet_prompt= --trace 
--forcemito --set mal_listing=2  --dbname=mTests_backends_monet5_datacell 
--set mal_listing=0 ; echo ; echo Over..
-# 16:53:52   
+# 15:50:08   
+# 15:50:08   mserver5 --debug=10 --set gdk_nr_threads=0 --set 
mapi_open=true --set mapi_port=30649 --set 
mapi_usock=/var/tmp/mtest-26552/.s.monetdb.30649 --set monet_prompt= 
--forcemito --set mal_listing=2 
--dbpath=/export/scratch1/mk/Jan2014//Linux/var/MonetDB/mTests_sql_backends_monet5_datacell
 --set mal_listing=0
+# 15:50:08   
 
-# builtin opt  gdk_dbname = demo
-# builtin opt  gdk_dbfarm = 
/net/rig.ins.cwi.nl/export/scratch0/manegold/Monet/HG/Aug2011/prefix/--enable-datacell_--disable-debug_--enable-optimize_--disable-assert/var/monetdb5/dbfarm
+# builtin opt  gdk_dbpath = 
/export/scratch1/mk/Jan2014//Linux/var/monetdb5/dbfarm/demo
 # builtin opt  gdk_debug = 0
-# builtin opt  gdk_alloc_map = no
-# builtin opt  gdk_vmtrim = yes
+# builtin opt  gdk_vmtrim = no
 # builtin opt  monet_prompt = 
 # builtin opt  monet_daemon = no
 # builtin opt  mapi_port = 5
@@ -18,20 +16,20 @@ stderr of test 'datacell00` in directory
 # builtin opt  sql_optimizer = default_pipe
 # builtin opt  sql_debug = 0
 # cmdline opt  gdk_nr_threads = 0
-# cmdline opt  gdk_dbfarm = 
/net/rig.ins.cwi.nl/export/scratch0/manegold/Monet/HG/Aug2011/prefix/--enable-datacell_--disable-debug_--enable-optimize_--disable-assert/var/MonetDB
 # cmdline opt  mapi_open = true
-# cmdline opt  mapi_port = 39463
+# cmdline opt  mapi_port 

MonetDB: default - Deduced a syntactically correct query from th...

2014-03-24 Thread Sjoerd Mullender
Changeset: f3ad13ee0c6d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f3ad13ee0c6d
Modified Files:
geom/sql/Tests/All
geom/sql/Tests/T13.sql
geom/sql/Tests/T13.stable.out
geom/sql/Tests/T14.sql
geom/sql/Tests/T14.stable.out
Branch: default
Log Message:

Deduced a syntactically correct query from the incorrect T13 and T14.
It now also produces the correct answer (although the polygon is
traversed in a different order when I try it).


diffs (61 lines):

diff --git a/geom/sql/Tests/All b/geom/sql/Tests/All
--- a/geom/sql/Tests/All
+++ b/geom/sql/Tests/All
@@ -30,8 +30,8 @@ T8
 T10
 T11
 T12
-# T13  !syntax/parse error (incorrect query in document)
-# T14  !syntax/parse error (incorrect query in document)
+T13
+T14
 T15
 T16
 # T17  no such unary operator 'startpoint(linestring)'
diff --git a/geom/sql/Tests/T13.sql b/geom/sql/Tests/T13.sql
--- a/geom/sql/Tests/T13.sql
+++ b/geom/sql/Tests/T13.sql
@@ -1,2 +1,2 @@
 -- Conformance Item T13
-SELECT AsText(Boundary((boundary),101) FROM named_places WHERE name = 'Goose 
Island';
+SELECT AsText(Boundary(boundary)) FROM named_places WHERE name = 'Goose 
Island';
diff --git a/geom/sql/Tests/T13.stable.out b/geom/sql/Tests/T13.stable.out
--- a/geom/sql/Tests/T13.stable.out
+++ b/geom/sql/Tests/T13.stable.out
@@ -27,10 +27,10 @@ Ready.
 
 #SELECT AsText(Boundary((boundary),101) FROM named_places WHERE name = 'Goose 
Island';
 % sys.L # table_name
-% astext_boundary # name
+% boundary_boundary # name
 % clob # type
-% 220 # length
-[ \LINESTRING ((67. 13., 67. 
18., 59. 18., 
59. 13., 67. 
13.))\ ]
+% 218 # length
+[ \LINESTRING (67. 13., 67. 
18., 59. 18., 
59. 13., 67. 
13.)\   ]
 
 # 07:38:48   
 # 07:38:48   Done.
diff --git a/geom/sql/Tests/T14.sql b/geom/sql/Tests/T14.sql
--- a/geom/sql/Tests/T14.sql
+++ b/geom/sql/Tests/T14.sql
@@ -1,2 +1,2 @@
 -- Conformance Item T14
-SELECT AsText(Envelope((boundary),101) FROM named_places WHERE name = 'Goose 
Island';
+SELECT AsText(Envelope(boundary)) FROM named_places WHERE name = 'Goose 
Island';
diff --git a/geom/sql/Tests/T14.stable.out b/geom/sql/Tests/T14.stable.out
--- a/geom/sql/Tests/T14.stable.out
+++ b/geom/sql/Tests/T14.stable.out
@@ -27,10 +27,10 @@ Ready.
 
 #SELECT AsText(Envelope((boundary),101) FROM named_places WHERE name = 'Goose 
Island';
 % sys.L # table_name
-% astext_boundary # name
+% envelope_boundary # name
 % clob # type
 % 217 # length
-[ \POLYGON ((67. 13., 67. 
18., 59. 18., 
59. 13., 67. 
13.))\]
+[ \POLYGON ((59. 13., 67. 
13., 67. 18., 
59. 18., 59. 
13.))\]
 
 # 07:38:48   
 # 07:38:48   Done.
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list