Changeset: 71a8678a709b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=71a8678a709b Modified Files: monetdb5/mal/mal.h monetdb5/mal/mal_listing.c Branch: default Log Message:
Fix type qualifiers in remote MAL programs diffs (49 lines): diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h --- a/monetdb5/mal/mal.h +++ b/monetdb5/mal/mal.h @@ -98,6 +98,7 @@ mal_export void mal_exit(void); #define LIST_MAL_VALUE 8 /* list bat tuple count */ #define LIST_MAL_PROPS 16 /* show variable properties */ #define LIST_MAL_MAPI 32 /* output Mapi compatible output */ +#define LIST_MAL_REMOTE 64 /* output MAL for remote execution */ #define LIST_MAL_CALL (LIST_MAL_NAME | LIST_MAL_VALUE ) #define LIST_MAL_DEBUG (LIST_MAL_NAME | LIST_MAL_VALUE | LIST_MAL_TYPE | LIST_MAL_PROPS) #define LIST_MAL_ALL (LIST_MAL_NAME | LIST_MAL_VALUE | LIST_MAL_TYPE | LIST_MAL_PROPS | LIST_MAL_MAPI) diff --git a/monetdb5/mal/mal_listing.c b/monetdb5/mal/mal_listing.c --- a/monetdb5/mal/mal_listing.c +++ b/monetdb5/mal/mal_listing.c @@ -94,7 +94,7 @@ renderTerm(MalBlkPtr mb, MalStkPtr stk, strcat(buf+len,"\""); len++; } - showtype =closequote > TYPE_str || ((isVarUDFtype(mb,varid) || isVarTypedef(mb,varid)) && isVarConstant(mb,varid)) || + showtype =closequote > TYPE_str || ((isVarUDFtype(mb,varid) || isVarTypedef(mb,varid) || (flg & LIST_MAL_REMOTE)) && isVarConstant(mb,varid)) || (isaBatType(getVarType(mb,varid)) && idx < p->retc); if (stk && isaBatType(getVarType(mb,varid)) && abs(stk->stk[varid].val.ival) ){ @@ -107,7 +107,7 @@ renderTerm(MalBlkPtr mb, MalStkPtr stk, // show the type when required or frozen by the user // special care should be taken with constants, they may have been casted - if ((flg & LIST_MAL_TYPE ) || (isVarUDFtype(mb, varid) && idx < p->retc) || isVarTypedef(mb,varid) || showtype){ + if ((flg & LIST_MAL_TYPE) || (isVarUDFtype(mb, varid) && idx < p->retc) || isVarTypedef(mb,varid) || showtype){ strcat(buf + len,":"); len++; tpe = getTypeName(getVarType(mb, varid)); @@ -376,6 +376,7 @@ instruction2str(MalBlkPtr mb, MalStkPtr return s; } +/* Remote execution of MAL calls for more type/property information to be exchanged */ str mal2str(MalBlkPtr mb, int first, int last) { @@ -395,7 +396,7 @@ mal2str(MalBlkPtr mb, int first, int las if( i == 0) txt[i] = instruction2str(mb, 0, getInstrPtr(mb, i), LIST_MAL_NAME | LIST_MAL_TYPE | LIST_MAL_PROPS); else - txt[i] = instruction2str(mb, 0, getInstrPtr(mb, i), LIST_MAL_CALL | LIST_MAL_PROPS ); + txt[i] = instruction2str(mb, 0, getInstrPtr(mb, i), LIST_MAL_CALL | LIST_MAL_PROPS | LIST_MAL_REMOTE); #ifdef _DEBUG_LISTING_ mnstr_printf(GDKout,"%s\n",txt[i]); #endif _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list