Changeset: fcbde4f130d6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fcbde4f130d6 Modified Files: monetdb5/extras/rdf/rdfschema.c sql/backends/monet5/sql_rdf.c Branch: rdf Log Message:
Store all exceptions in pso. Including extra data type in main tables and in mv tables diffs (126 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 @@ -10345,6 +10345,9 @@ str fillMissingvaluesAll(CStableStat* cs for (i = 0; i < (MULTIVALUES + 1); i++){ if (csPropTypes[lasttblIdx].lstPropTypes[lastPropIdx].TableTypes[i] == TYPETBL){ + #if STORE_ALL_EXCEPTION_IN_PSO + continue; + #endif tmpColExIdx = csPropTypes[lasttblIdx].lstPropTypes[lastPropIdx].colIdxes[i]; tmpBat = cstablestat->lstcstableEx[lasttblIdx].colBats[tmpColExIdx]; //printf("Fill excol %d \n", tmpColExIdx); @@ -10391,6 +10394,9 @@ str fillMissingValueByNils(CStableStat* */ for (i = 0; i < (MULTIVALUES + 1); i++){ if (csPropTypes[tblIdx].lstPropTypes[propIdx].TableTypes[i] == TYPETBL){ + #if STORE_ALL_EXCEPTION_IN_PSO + continue; + #endif tmpColExIdx = csPropTypes[tblIdx].lstPropTypes[propIdx].colIdxes[i]; tmpBat = cstablestat->lstcstableEx[tblIdx].colBats[tmpColExIdx]; //Fill all missing values from From to To @@ -10743,7 +10749,18 @@ str RDFdistTriplesToCSs_alloid(int *ret, objType = getObjType(*obt); assert (objType != BLANKNODE); + tmpPropIdx = tmpTblIdxPropIdxMap[tblIdx]; + + defaultType = csPropTypes[tblIdx].lstPropTypes[tmpPropIdx].defaultType; + assert(defaultType != MULTIVALUES); + #if STORE_ALL_EXCEPTION_IN_PSO + if (objType != defaultType){ + insToPSO(cstablestat->pbat,cstablestat->sbat, cstablestat->obat, pbt, sbt, obt); + continue; + } + #endif + //printf(" PropIdx = %d \n", tmpPropIdx); tmpColIdx = csPropTypes[tblIdx].lstPropTypes[tmpPropIdx].defColIdx; if (tmpColIdx == -1){ // This col is removed as an infrequent prop @@ -10781,7 +10798,6 @@ str RDFdistTriplesToCSs_alloid(int *ret, #endif istmpMVProp = csPropTypes[tblIdx].lstPropTypes[tmpPropIdx].isMVProp; - defaultType = csPropTypes[tblIdx].lstPropTypes[tmpPropIdx].defaultType; #if DETECT_PKCOL isPossiblePK = 1; #if ONLY_URI_PK @@ -11449,6 +11465,8 @@ str RDFdistTriplesToCSs(int *ret, bat *s istmpMVProp = csPropTypes[tblIdx].lstPropTypes[tmpPropIdx].isMVProp; defaultType = csPropTypes[tblIdx].lstPropTypes[tmpPropIdx].defaultType; + + #if DETECT_PKCOL isPossiblePK = 1; #if ONLY_URI_PK diff --git a/sql/backends/monet5/sql_rdf.c b/sql/backends/monet5/sql_rdf.c --- a/sql/backends/monet5/sql_rdf.c +++ b/sql/backends/monet5/sql_rdf.c @@ -786,6 +786,8 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr BAT *ontbat = NULL; int **colOrder = NULL; + (void) tmptbnameex; + beginT = clock(); rethrow("sql.rdfShred", msg, getSQLContext(cntxt, mb, &m, NULL)); @@ -974,6 +976,9 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr //Value columns for (k = 0; k < tmpNumMVCols; k++){ + #if STORE_ALL_EXCEPTION_IN_PSO == 1 + if (k > 0) continue; //Only keep the first default type column as other columns will be stored in pso + #endif getColSQLname(tmpmvcolname, j, k, cstablestat->lstcstable[i].lstProp[j], mapi, mbat); tmpbat = cstablestat->lstcstable[i].lstMVTables[j].mvBats[k]; @@ -989,6 +994,7 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr totalNumDefCols += cstablestat->lstcstable[i].numCol; #if CSTYPE_TABLE == 1 + #if STORE_ALL_EXCEPTION_IN_PSO == 0 // Add non-default type table if (cstablestat->lstcstableEx[i].numCol != 0){ @@ -1011,7 +1017,7 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr } totalNumNonDefCols += cstablestat->lstcstableEx[i].numCol; } - + #endif #endif #if APPENDSUBJECTCOLUMN @@ -1060,7 +1066,9 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr //Value columns for (k = 0; k < tmpNumMVCols; k++){ - + #if STORE_ALL_EXCEPTION_IN_PSO == 1 + if (k > 0) continue; //Only keep the first default type column as other columns will be stored in pso + #endif getColSQLname(tmpmvcolname, j, k, cstablestat->lstcstable[i].lstProp[j], mapi, mbat); tmpbat = cstablestat->lstcstable[i].lstMVTables[j].mvBats[k]; @@ -1078,6 +1086,7 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr #if CSTYPE_TABLE == 1 + #if STORE_ALL_EXCEPTION_IN_PSO == 0 // Add non-default type table if (cstablestat->lstcstableEx[i].numCol != 0){ for (j = 0; j < cstablestat->lstcstableEx[i].numCol; j++){ @@ -1095,7 +1104,7 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr tmpbat, TYPE_bat); } } - + #endif #endif //Create a view to combine these tables /* _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list