MonetDB: rdf - Compute precision after filtering
Changeset: 87f3446f4b6c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=87f3446f4b6c Modified Files: monetdb5/extras/rdf/rdfschema.c Branch: rdf Log Message: Compute precision after filtering diffs (58 lines): 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 @@ -8973,8 +8973,8 @@ void computeMetricsQ(CSset *freqCSset){ CS cs; int totalCov = 0; float totalPrecision = 0.0; - int overalFill = 0; - int overalMaxFill = 0; + longoveralFill = 0; + longoveralMaxFill = 0; float Q = 0.0; int i; @@ -8997,13 +8997,15 @@ void computeMetricsQ(CSset *freqCSset){ totalPrecision += fillRatio[tblIdx]; overalFill += cs.numFill; overalMaxFill += cs.numProp * cs.support; + + if ((cs.numProp * cs.support) > 100) printf("FreqCS %d has %d prop and support %d (Fill Ratio %f )\n",i,cs.numProp,cs.support,fillRatio[tblIdx]); Q += weight[tblIdx]; } } printf("Performance metric Q = (weighting %f)/(totalCov %d * numTbl %d) \n", Q,totalCov, curNumMergeCS); printf("Average precision = %f\n",(float)totalPrecision/curNumMergeCS); - printf("Overall precision = %f\n", (float) overalFill/overalMaxFill); + printf("Overall precision = %f (overfill %ld / overalMaxFill %ld)\n", (float) overalFill/overalMaxFill, overalFill, overalMaxFill); //printf("Average precision = %f\n",(float)totalPrecision/totalCov); Q = Q/((float)totalCov * curNumMergeCS); @@ -9044,6 +9046,10 @@ void computeMetricsQForRefinedTable(CSse charfilename[100]; #endif + float totalPrecision = 0.0; + longoveralFill = 0; + longoveralMaxFill = 0; + fillRatio = (float*)malloc(sizeof(float) * numTables); refRatio = (float*)malloc(sizeof(float) * numTables); weight = (float*)malloc(sizeof(float) * numTables); @@ -9171,9 +9177,15 @@ void computeMetricsQForRefinedTable(CSse weight[i] = (float) cs.coverage * ( fillRatio[i] + refRatio[i]); totalCov += cs.coverage; + totalPrecision += fillRatio[i]; + overalFill += numRefinedFills[i]; + overalMaxFill += tmpNumFreqProps * numRefinedSupport[i]; + Q += weight[i]; } printf("Refined Table: Performance metric Q = (weighting %f)/(totalCov %d * numTbl %d) \n", Q,totalCov, numTables); + printf("Average precision = %f\n",(float)totalPrecision/numTables); + printf("Overall precision = %f (overfill %ld / overalMaxFill %ld)\n", (float) overalFill/overalMaxFill, overalFill, overalMaxFill); Q = Q/((float)totalCov * numTables); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Don't include no longer existing array module.
Changeset: b0f9ee89bf2f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0f9ee89bf2f Modified Files: monetdb5/modules/mal/mal_init.mal Branch: default Log Message: Don't include no longer existing array module. Fix after changeset b62643655146. diffs (11 lines): diff --git a/monetdb5/modules/mal/mal_init.mal b/monetdb5/modules/mal/mal_init.mal --- a/monetdb5/modules/mal/mal_init.mal +++ b/monetdb5/modules/mal/mal_init.mal @@ -47,7 +47,6 @@ include status; include groupby; include group; include aggr; -include array; include mkey; # Atom extensions ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - also push crossproduct down through union's
Changeset: e3393cf00745 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e3393cf00745 Modified Files: sql/server/rel_exp.c sql/server/rel_optimizer.c sql/test/BugTracker-2009/Tests/join_topn.SF-2654133.stable.out sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.stable.out Branch: default Log Message: also push crossproduct down through union's diffs (66 lines): diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c --- a/sql/server/rel_exp.c +++ b/sql/server/rel_exp.c @@ -1432,8 +1432,12 @@ list * exps_copy( sql_allocator *sa, list *exps) { node *n; - list *nl = new_exp_list(sa); + list *nl; + if (!exps) + return exps; + + nl = new_exp_list(sa); for(n = exps->h; n; n = n->next) { sql_exp *arg = n->data; diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -3489,10 +3489,10 @@ rel_uses_part_nr( sql_rel *rel, sql_exp static sql_rel * rel_push_join_down_union(int *changes, mvc *sql, sql_rel *rel) { - if (((is_join(rel->op) && !is_outerjoin(rel->op)) || is_semi(rel->op)) && !list_empty(rel->exps)) { + if ((is_join(rel->op) && !is_outerjoin(rel->op)) || is_semi(rel->op)) { sql_rel *l = rel->l, *r = rel->r, *ol = l, *or = r; list *exps = rel->exps; - sql_exp *je = exps->h->data; + sql_exp *je = !list_empty(exps)?exps->h->data:NULL; if (!l || !r || need_distinct(l) || need_distinct(r)) return rel; @@ -3503,7 +3503,7 @@ rel_push_join_down_union(int *changes, m /* both sides only if we have a join index */ if (!l || !r ||(is_union(l->op) && is_union(r->op) && - !find_prop(je->p, PROP_JOINIDX) && /* FKEY JOIN */ + je && !find_prop(je->p, PROP_JOINIDX) && /* FKEY JOIN */ !rel_is_join_on_pkey(rel))) /* aligned PKEY JOIN */ return rel; diff --git a/sql/test/BugTracker-2009/Tests/join_topn.SF-2654133.stable.out b/sql/test/BugTracker-2009/Tests/join_topn.SF-2654133.stable.out --- a/sql/test/BugTracker-2009/Tests/join_topn.SF-2654133.stable.out +++ b/sql/test/BugTracker-2009/Tests/join_topn.SF-2654133.stable.out @@ -28,7 +28,7 @@ Ready. [ 1] [ 1] #select * from tables, x limit 10; -% .tables, .tables,.tables,.tables,.tables, .tables,.tables,.tables,.tables,sys.x, sys.x # table_name +% .tables, .tables,.tables,.tables,.tables, .tables,.tables,.tables,.tables,.x, .x # table_name % id, name, schema_id, query, type, system, commit_action, readonly, temporary, n, s # name % int, varchar,int,varchar,smallint, boolean, smallint, boolean,tinyint,int,varchar # type % 4, 9, 4, 0, 1, 5, 1, 5, 1, 1, 5 # length diff --git a/sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.stable.out b/sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.stable.out --- a/sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.stable.out +++ b/sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.stable.out @@ -31,7 +31,7 @@ Ready. # where t.name IN ('args', 'columns', 'functions', 'idxs', # 'objects', 'keys', 'modules', 'sequences') # group by s.name having count(*) > char_length(s.name); -% sys.s, sys.L1, sys.L2 # table_name +% .s, .L1,.L2 # table_name % name,L1, L2 # name % varchar, int,wrd # type % 4, 1, 2 # length ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: holindex - Remove "comment" line. Comment syntax differ...
Changeset: 7fafea4885a3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7fafea4885a3 Modified Files: monetdb5/extras/crackers/crackers_select_ops.mx monetdb5/extras/crackers/crackers_selectholpl_ops.mx Branch: holindex Log Message: Remove "comment" line. Comment syntax different in .mx diffs (22 lines): diff --git a/monetdb5/extras/crackers/crackers_select_ops.mx b/monetdb5/extras/crackers/crackers_select_ops.mx --- a/monetdb5/extras/crackers/crackers_select_ops.mx +++ b/monetdb5/extras/crackers/crackers_select_ops.mx @@ -991,7 +991,6 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi cl2 = BUNfirst(b); ch2 = BUNlast(b)-(oid)1; @:crkTwoRTree(@1)@ - //@:crkTwoRTreeCopy(@1)@ if (gapH>0) addCrackerIndex_@1(m,hgh,HBound,vh,c); vl = BUNfirst(b); pieces=pieces+2; diff --git a/monetdb5/extras/crackers/crackers_selectholpl_ops.mx b/monetdb5/extras/crackers/crackers_selectholpl_ops.mx --- a/monetdb5/extras/crackers/crackers_selectholpl_ops.mx +++ b/monetdb5/extras/crackers/crackers_selectholpl_ops.mx @@ -1455,7 +1455,6 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi cl2 = BUNfirst(b); ch2 = BUNlast(b)-(oid)1; @:crkTwoRTree(@1)@ - //@:crkTwoRTreeCopy(@1)@ if (gapH>0) { addCrackerIndex_@1(m,hgh,HBound,vh,c); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Removed Alex's array implementation
Changeset: b62643655146 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b62643655146 Removed Files: monetdb5/mal/Tests/tst267.mal monetdb5/mal/Tests/tst267.stable.err monetdb5/mal/Tests/tst267.stable.out monetdb5/modules/kernel/array.c monetdb5/modules/kernel/array.h monetdb5/modules/kernel/array.mal monetdb5/optimizer/Tests/AEexample.mal monetdb5/optimizer/Tests/AEexample.stable.err monetdb5/optimizer/Tests/AEexample.stable.out monetdb5/optimizer/Tests/GCexample.mal monetdb5/optimizer/Tests/GCexample.stable.err monetdb5/optimizer/Tests/GCexample.stable.out monetdb5/optimizer/Tests/tst4800.mal monetdb5/optimizer/Tests/tst4800.stable.err monetdb5/optimizer/Tests/tst4800.stable.out monetdb5/optimizer/Tests/tst4801.mal monetdb5/optimizer/Tests/tst4801.stable.err monetdb5/optimizer/Tests/tst4801.stable.out monetdb5/optimizer/Tests/tst4810.mal monetdb5/optimizer/Tests/tst4810.stable.err monetdb5/optimizer/Tests/tst4810.stable.out monetdb5/optimizer/Tests/tst4900.mal monetdb5/optimizer/Tests/tst4900.stable.err monetdb5/optimizer/Tests/tst4900.stable.out 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/exports.stable.out monetdb5/modules/kernel/Makefile.ag Branch: default Log Message: Removed Alex's array implementation diffs (truncated from 2760 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 @@ -2849,46 +2849,6 @@ command alarm.usec{unsafe}():lng address ALARMusec; comment return cpu microseconds info -command array.grid(b:bat[:oid,:lng],i:lng,j:lng,k:lng,l:lng,s:lng):bat[:oid,:lng] -address ARRAYgridBATshift_lng; -comment Fills an index BAT, (grpcount,grpsize,clustersize,offset)and shift all elemenets with a factor s - -command array.grid(b:bat[:oid,:lng],i:lng,j:lng,k:lng,l:lng):bat[:oid,:lng] -address ARRAYgridBAT_lng; -comment Fills an index BAT, (grpcount,grpsize,clustersize,offset) - -command array.grid(i:lng,j:lng,k:lng,l:lng,s:lng):bat[:oid,:lng] -address ARRAYgridShift_lng; -comment Generates an index BAT, (grpcount,grpsize,clustersize,offset)and shift all elements with a factor s - -command array.grid(i:lng,j:lng,k:lng,l:lng):bat[:oid,:lng] -address ARRAYgrid_lng; -comment Generates an index BAT, (grpcount,grpsize,clustersize,offset) - -command array.grid(b:bat[:oid,:int],i:int,j:int,k:int,l:int,s:int):bat[:oid,:int] -address ARRAYgridBATshift_int; -comment Fills an index BAT, (grpcount,grpsize,clustersize,offset)and shift all elemenets with a factor s - -command array.grid(b:bat[:oid,:int],i:int,j:int,k:int,l:int):bat[:oid,:int] -address ARRAYgridBAT_int; -comment Fills an index BAT, (grpcount,grpsize,clustersize,offset) - -command array.grid(i:int,j:int,k:int,l:int,s:int):bat[:oid,:int] -address ARRAYgridShift_int; -comment Generates an index BAT, (grpcount,grpsize,clustersize,offset)and shift all elements with a factor s - -command array.grid(i:int,j:int,k:int,l:int):bat[:oid,:int] -address ARRAYgrid_int; -comment Generates an index BAT, (grpcount,grpsize,clustersize,offset) - -command array.project(b:bat[:oid,:any_1],i:int):bat[:oid,:int] -address ARRAYproject; -comment Fill an array representation with constants - -command array.product(b:bat[:oid,:any_1],c:bat[:oid,:any_2]) (X_3:bat[:oid,:any_1],c:bat[:oid,:any_2]) -address ARRAYproduct; -comment Produce an array product - command batudf.fuse(one:bat[:oid,:int],two:bat[:oid,:int]):bat[:oid,:lng] address UDFBATfuse; comment fuse two (4-byte) int values into one (8-byte) lng value diff --git a/clients/Tests/MAL-signatures_gsl.stable.out b/clients/Tests/MAL-signatures_gsl.stable.out --- a/clients/Tests/MAL-signatures_gsl.stable.out +++ b/clients/Tests/MAL-signatures_gsl.stable.out @@ -2849,46 +2849,6 @@ command alarm.usec{unsafe}():lng address ALARMusec; comment return cpu microseconds info -command array.grid(b:bat[:oid,:lng],i:lng,j:lng,k:lng,l:lng,s:lng):bat[:oid,:lng] -address ARRAYgridBATshift_lng; -comment Fills an index BAT, (grpcount,grpsize,clustersize,offset)and shift all elemenets with a factor s - -command array.grid(b:bat[:oid,:lng],i:lng,j:lng,k:lng,l:lng):bat[:oid,:lng] -address ARRAYgridBAT_lng; -comment Fills an index BAT, (grpcount,grpsize,clustersize,offset) - -command array.grid(i:lng,j:lng,k:lng,l:lng,s:lng):bat[:oid,:lng] -address ARRAYgridShift_lng; -comment Generates an index BAT, (grpcount,grpsize,clustersize,offset)and shift all elements with a factor s - -command array.grid(i:lng,j:lng,k:lng,l:lng):bat[:oid,
MonetDB: rdf - Get overall precision
Changeset: b848d69bb812 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b848d69bb812 Modified Files: monetdb5/extras/rdf/rdfschema.c Branch: rdf Log Message: Get overall precision diffs (29 lines): 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 @@ -8973,6 +8973,9 @@ void computeMetricsQ(CSset *freqCSset){ CS cs; int totalCov = 0; float totalPrecision = 0.0; + int overalFill = 0; + int overalMaxFill = 0; + float Q = 0.0; int i; int curNumMergeCS = countNumberMergeCS(freqCSset); @@ -8992,12 +8995,15 @@ void computeMetricsQ(CSset *freqCSset){ //weight[tblIdx] = (float) cs.coverage * ( fillRatio[tblIdx]); //If do not consider reference ratio totalCov += cs.coverage; totalPrecision += fillRatio[tblIdx]; + overalFill += cs.numFill; + overalMaxFill += cs.numProp * cs.support; Q += weight[tblIdx]; } } printf("Performance metric Q = (weighting %f)/(totalCov %d * numTbl %d) \n", Q,totalCov, curNumMergeCS); printf("Average precision = %f\n",(float)totalPrecision/curNumMergeCS); + printf("Overall precision = %f\n", (float) overalFill/overalMaxFill); //printf("Average precision = %f\n",(float)totalPrecision/totalCov); Q = Q/((float)totalCov * curNumMergeCS); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list