Changeset: 139824ca804f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=139824ca804f Modified Files: monetdb5/optimizer/opt_support.c Branch: default Log Message:
Use function name check instead of property diffs (38 lines): diff --git a/monetdb5/optimizer/opt_support.c b/monetdb5/optimizer/opt_support.c --- a/monetdb5/optimizer/opt_support.c +++ b/monetdb5/optimizer/opt_support.c @@ -646,16 +646,16 @@ int isAllScalar(MalBlkPtr mb, InstrPtr p */ static int -instrHasProp(InstrPtr p, int prop) +isOrderDepenent(InstrPtr p) { - int i; - MalBlkPtr mb = p->blk; - - for (i = 0; i < mb->ptop; i++) { - if (mb->prps[i].idx == prop) - return 1; - } - return 0; + if( getModuleId(p) != batsqlRef) + return 0; + if ( getFunctionId(p) == diffRef || + getFunctionId(p) == row_numberRef || + getFunctionId(p) == rankRef || + getFunctionId(p) == dense_rankRef) + return 1; + return 0; } int isMapOp(InstrPtr p){ @@ -664,7 +664,7 @@ int isMapOp(InstrPtr p){ (getModuleId(p) == malRef && getFunctionId(p) == manifoldRef) || (getModuleId(p) == batcalcRef) || (getModuleId(p) != batcalcRef && getModuleId(p) != batRef && strncmp(getModuleId(p), "bat", 3) == 0) || - (getModuleId(p) == mkeyRef)) && (!instrHasProp(p, orderDependendProp)) && + (getModuleId(p) == mkeyRef)) && !isOrderDepenent(p) && getModuleId(p) != rapiRef; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list