Changeset: 6353912d4455 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6353912d4455
Modified Files:
        monetdb5/extras/rdf/rdfschema.c
        sql/backends/monet5/sql.mx
Branch: rdf
Log Message:

Fix the bug caused by not assigning the propId for Multi-valued col.


diffs (62 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
@@ -5673,10 +5673,11 @@ void initCStables(CStableStat* cstablest
                #endif
                
                for(j = 0; j < tmpNumDefaultCol; j++){
+                       cstablestat->lstcstable[i].lstProp[j] = 
freqCSset->items[csPropTypes[i].freqCSId].lstProp[j];
+
                        if (csPropTypes[i].lstPropTypes[j].isMVProp == 0){
                                cstablestat->lstcstable[i].colBats[j] = 
BATnew(TYPE_void, 
mapObjBATtypes[(int)csPropTypes[i].lstPropTypes[j].defaultType], smallbatsz);
                                
cstablestat->lstcstable[i].lstMVTables[j].numCol = 0;   //There is no MV Tbl 
for this prop
-                               cstablestat->lstcstable[i].lstProp[j] = 
freqCSset->items[csPropTypes[i].freqCSId].lstProp[j];
                                //TODO: use exact size for each BAT
                        }
                        else{
diff --git a/sql/backends/monet5/sql.mx b/sql/backends/monet5/sql.mx
--- a/sql/backends/monet5/sql.mx
+++ b/sql/backends/monet5/sql.mx
@@ -7792,7 +7792,7 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr
        }
        for (i = 0; i < cstablestat->numTables; i++){
                //printf("creating table %d \n", i);
-               sprintf(tmptbname, "cstable%d",i);
+               sprintf(tmptbname, "cstable");
 
                sprintf(tmpstr, "%d",i);
                //getTblName(tmptbname, cstablestat->lstcstable[i].tblname); 
@@ -7808,7 +7808,7 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr
                for (j = 0; j < cstablestat->numPropPerTable[i]; j++){
 
                        //TODO: Use propertyId from Propstat
-                       sprintf(tmpcolname, 
"col%d",(int)(cstablestat->lstcstable[i].lstProp[j]));
+                       sprintf(tmpcolname, 
"col"BUNFMT,(cstablestat->lstcstable[i].lstProp[j]));
 
                        tmpbat = cstablestat->lstcstable[i].colBats[j];
 
@@ -7836,11 +7836,11 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr
                #if CSTYPE_TABLE == 1
                // Add non-default type table
                if (cstablestat->lstcstableEx[i].numCol != 0){  
-                       sprintf(tmptbnameex, "cstableex%d",i);
-
-                       sprintf(tmpstr, "Ex%d",i);
+                       sprintf(tmptbnameex, "cstable");
+
+                       sprintf(tmpstr, "ex%d",i);
                        //getTblName(tmptbname, 
cstablestat->lstcstable[i].tblname); 
-                       strcat(tmptbname,tmpstr);
+                       strcat(tmptbnameex,tmpstr);
                        //printf("TableEx %d: || %s || \n",i, tmptbname);
 
                        cstablesEx[i] = mvc_create_table(m, sch, tmptbnameex, 
tt_table, 0,
@@ -7862,7 +7862,7 @@ SQLrdfreorganize(Client cntxt, MalBlkPtr
                for (j = 0; j < cstablestat->numPropPerTable[i]; j++){
 
                        //TODO: Use propertyId from Propstat
-                       sprintf(tmpcolname, 
"col%d",(int)cstablestat->lstcstable[i].lstProp[j]);
+                       sprintf(tmpcolname, 
"col"BUNFMT,(cstablestat->lstcstable[i].lstProp[j]));
 
                        tmpbat = cstablestat->lstcstable[i].colBats[j];
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to