[Monetdb-developers] [Monetdb-checkins] MonetDB5/src/optimizer opt_datacyclotron.mx, , 1.6, 1.7 opt_derivepath.mx, , 1.4, 1.5 opt_joinpath.mx, , 1.46, 1.47 opt_macro.mx, , 1.46, 1.47 opt_prejoin.mx, , 1.7, 1.8 opt_remap.mx, , 1.47, 1.48 opt_statistics.mx, , 1.18, 1.19 opt_support.mx, , 1.100, 1.101 opt_trace.mx, , 1.12, 1.13 optimizer.mx, , 1.83, 1.84 optimizerWrapper.mx, , 1.29, 1.30

Sjoerd Mullender sjoerd at acm.org
Sun May 17 08:45:17 CEST 2009


Where are the definitions of ILLARG_CONSTANTS, PROGRAM_NYI and 
OPTIMIZER_CYCLE?

On 2009-05-16 23:02, Martin Kersten wrote:
> Update of /cvsroot/monetdb/MonetDB5/src/optimizer
> In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2012
> 
> Modified Files:
> 	opt_datacyclotron.mx opt_derivepath.mx opt_joinpath.mx 
> 	opt_macro.mx opt_prejoin.mx opt_remap.mx opt_statistics.mx 
> 	opt_support.mx opt_trace.mx optimizer.mx optimizerWrapper.mx 
> Log Message:
> The next batch of straightforward error clean up and condensation.
> 
> 
> U opt_derivepath.mx
> Index: opt_derivepath.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_derivepath.mx,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -d -r1.4 -r1.5
> --- opt_derivepath.mx	3 Apr 2009 16:48:41 -0000	1.4
> +++ opt_derivepath.mx	16 May 2009 21:02:04 -0000	1.5
> @@ -141,6 +141,6 @@
>  	(void) mb;
>  	(void) stk;
>  	(void) pci;
> -	throw(MAL,"group.derivePath","nyi");
> +	throw(MAL,"group.derivePath",PROGRAM_NYI);
>  }
>  @}
> 
> U opt_support.mx
> Index: opt_support.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_support.mx,v
> retrieving revision 1.100
> retrieving revision 1.101
> diff -u -d -r1.100 -r1.101
> --- opt_support.mx	6 May 2009 16:54:13 -0000	1.100
> +++ opt_support.mx	16 May 2009 21:02:04 -0000	1.101
> @@ -628,7 +628,7 @@
>  		sprintf(buf,"%-20s actions=%2d time=" LLFMT " usec",name,actions,usec);
>  		newComment(mb,buf);
>  		if (mb->errors) 
> -			throw(MAL,name,"failed\n");
> +			throw(MAL, name, PROGRAM_GENERAL);
>  	}
>  	/* code to collect all last versions to study code coverage  in SQL
>  	{stream *fd;
> @@ -677,7 +677,7 @@
>  		}
>  	} while (qot && cnt++ < mb->stop);
>  	if (cnt >= mb->stop)
> -		throw(MAL, "optimizer.MALoptimizer", "too many optimization cycles\n");
> +		throw(MAL, "optimizer.MALoptimizer", OPTIMIZER_CYCLE);
>  	return 0;
>  }
>  
> 
> U optimizerWrapper.mx
> Index: optimizerWrapper.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/optimizerWrapper.mx,v
> retrieving revision 1.29
> retrieving revision 1.30
> diff -u -d -r1.29 -r1.30
> --- optimizerWrapper.mx	16 May 2009 08:54:40 -0000	1.29
> +++ optimizerWrapper.mx	16 May 2009 21:02:04 -0000	1.30
> @@ -57,9 +57,7 @@
>  			!isVarConstant(mb,getArg(p,1)) ||
>  			!isVarConstant(mb,getArg(p,2))
>  		) {
> -			char buf[1024];
> -			snprintf(buf,1024, "Optimizer requires constant string arguments\n");
> -			throw(MAL, "optimizer. at 1",buf);
> +			throw(MAL, "optimizer. at 1", ILLARG_CONSTANTS);
>  		}
>  		if( stk != 0){
>  			modnme= *(str*)getArgReference(stk,p,1);
> @@ -72,8 +70,8 @@
>  
>  		if( s == NULL) {
>  			char buf[1024];
> -			snprintf(buf,1024, "Could not find %s.%s\n",modnme,fcnnme);
> -			throw(MAL, "optimizer. at 1",buf);
> +			snprintf(buf,1024, "%s.%s",modnme,fcnnme);
> +			throw(MAL, "optimizer. at 1", RUNTIME_OBJECT_UNDEFINED, buf);
>  		}
>  #ifdef _DEBUG_OPTIMIZER_
>  		stream_printf(cntxt->fdout,"@1 %s %s\n",modnme,fcnnme);
> 
> U opt_remap.mx
> Index: opt_remap.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_remap.mx,v
> retrieving revision 1.47
> retrieving revision 1.48
> diff -u -d -r1.47 -r1.48
> --- opt_remap.mx	16 May 2009 08:54:40 -0000	1.47
> +++ opt_remap.mx	16 May 2009 21:02:04 -0000	1.48
> @@ -529,7 +529,7 @@
>  #else
>  	(void) cntxt;
>  #endif
> -	throw(MAL,"opt.remap","no implementation present");
> +	throw(MAL, "opt.remap", PROGRAM_NYI);
>  }
>  @include optimizerWrapper.mx
>  @h
> 
> U opt_prejoin.mx
> Index: opt_prejoin.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_prejoin.mx,v
> retrieving revision 1.7
> retrieving revision 1.8
> diff -u -d -r1.7 -r1.8
> --- opt_prejoin.mx	12 Apr 2009 20:22:29 -0000	1.7
> +++ opt_prejoin.mx	16 May 2009 21:02:04 -0000	1.8
> @@ -62,11 +62,11 @@
>  
>  	*rl = *rr = 0;
>  	if( (bl= BATdescriptor(*l)) == NULL ){
> -		throw(MAL, "algebra.prejoin", "Cannot access descriptor");
> +		throw(MAL, "algebra.prejoin", INTERNAL_BAT_ACCESS);
>  	}
>  	if( (br= BATdescriptor(*r)) == NULL ){
>  		BBPreleaseref(bl->batCacheid);
> -		throw(MAL, "algebra.prejoin", "Cannot access descriptor");
> +		throw(MAL, "algebra.prejoin", INTERNAL_BAT_ACCESS);
>  	}
>  	lpages= (BUN) ((bl->H->heap.size + bl->T->heap.size)/MT_pagesize());
>  	rpages= (BUN) ((br->H->heap.size + br->T->heap.size)/MT_pagesize());
> 
> U opt_macro.mx
> Index: opt_macro.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_macro.mx,v
> retrieving revision 1.46
> retrieving revision 1.47
> diff -u -d -r1.46 -r1.47
> --- opt_macro.mx	16 May 2009 08:54:40 -0000	1.46
> +++ opt_macro.mx	16 May 2009 21:02:04 -0000	1.47
> @@ -388,7 +388,7 @@
>  		retseen = p->token == RETURNsymbol || p->token == YIELDsymbol || p->barrier == RETURNsymbol || p->barrier == YIELDsymbol;
>  	}
>  	if (retseen && i != mb->stop - 1)
> -		throw(MAL, "optimizer.MACROvalidate", "RETURN statement is not the last one");
> +		throw(MAL, "optimizer.MACROvalidate", MACRO_SYNTAX_ERROR);
>  	return MAL_SUCCEED;
>  }
>  
> @@ -417,13 +417,13 @@
>  			stream_printf(cntxt->fdout,"Hit, replace macro call %s\n", t->name);
>  #endif
>  			if (i == last)
> -				throw(MAL, "optimizer.MACROoptimizer", "duplicate macro expansion");
> +				throw(MAL, "optimizer.MACROoptimizer", MACRO_DUPLICATE);
>  
>  			last = i;
>  			i = inlineMALblock(mb, i, t->def);
>  			cnt++;
>  			if (cnt > MAXEXPANSION)
> -				throw(MAL, "optimizer.MACROoptimizer", "too many macro expansions");
> +				throw(MAL, "optimizer.MACROoptimizer", MACRO_TOO_DEEP);
>  		}
>  	}
>  	return msg;
> 
> U opt_trace.mx
> Index: opt_trace.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_trace.mx,v
> retrieving revision 1.12
> retrieving revision 1.13
> diff -u -d -r1.12 -r1.13
> --- opt_trace.mx	7 Jan 2009 14:15:13 -0000	1.12
> +++ opt_trace.mx	16 May 2009 21:02:04 -0000	1.13
> @@ -90,7 +90,7 @@
>  
>  		trace= fopen(defaultLog,"a");
>  		if( trace == 0)
> -			throw(MAL,"mdb.collect","Could not create trace file");
> +			throw(MAL, "mdb.collect", RUNTIME_FILE_NOT_FOUND);
>  		fprintf(trace,"#-------- \n");
>  		fflush(trace);
>  	}
> 
> U optimizer.mx
> Index: optimizer.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/optimizer.mx,v
> retrieving revision 1.83
> retrieving revision 1.84
> diff -u -d -r1.83 -r1.84
> --- optimizer.mx	16 May 2009 08:54:40 -0000	1.83
> +++ optimizer.mx	16 May 2009 21:02:04 -0000	1.84
> @@ -151,7 +151,7 @@
>  	}
>  	s = findSymbol(cntxt->nspace, putName(modnme,strlen(modnme)), fcnnme);
>  	if (s == NULL)
> -		throw(MAL, "optimizer.optimize", "operation not found\n");
> +		throw(MAL, "optimizer.optimize", SEMANTIC_OPERATION_MISSING);
>  	removeInstruction(mb, pci);
>  	return optimizeMALBlock(cntxt, s->def);
>  }
> @@ -180,8 +180,8 @@
>  
>  	if (s == NULL) {
>  		char buf[1024];
> -		snprintf(buf,1024, "Could not find %s.%s\n", modnme, fcnnme);
> -		throw(MAL, "optimizer.showFlowGraph", buf);
> +		snprintf(buf,1024, "%s.%s", modnme, fcnnme);
> +		throw(MAL, "optimizer.showFlowGraph", RUNTIME_OBJECT_UNDEFINED, buf);
>  	}
>  	showFlowGraph(s->def, stk, fname);
>  	return MAL_SUCCEED;
> @@ -209,8 +209,8 @@
>  
>  		if (s == NULL) {
>  			char buf[1024];
> -			snprintf(buf,1024, "Could not find %s.%s\n", modnme, fcnnme);
> -			throw(MAL, "optimizer.showPlan", buf);
> +			snprintf(buf,1024, "%s.%s", modnme, fcnnme);
> +			throw(MAL, "optimizer.showPlan", RUNTIME_OBJECT_UNDEFINED, buf);
>  		}
>  		mb= s->def;
>  	}
> @@ -271,7 +271,7 @@
>  #endif
>  	if( s== 0)
>  		return throwException(MALEXCEPTION,"optimizer. at 1optimizer",
> -			"module '%s' not found\n",fcn);
> +			RUNTIME_OBJECT_UNDEFINED, fcn);
>  	if( s->subscope){
>  		j = getSubScope(fcn); 
>  		for(t= s->subscope[j];t!=NULL;t=t->peer)
> 
> U opt_joinpath.mx
> Index: opt_joinpath.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_joinpath.mx,v
> retrieving revision 1.46
> retrieving revision 1.47
> diff -u -d -r1.46 -r1.47
> --- opt_joinpath.mx	29 Apr 2009 07:41:50 -0000	1.46
> +++ opt_joinpath.mx	16 May 2009 21:02:04 -0000	1.47
> @@ -484,7 +484,7 @@
>  			for( --top; top>=0; top--)
>  				BBPreleaseref(joins[top]->batCacheid);
>  			GDKfree(joins);
> -			throw(MAL, "algebra.joinPath", "Cannot access descriptor");
> +			throw(MAL, "algebra.joinPath", INTERNAL_BAT_ACCESS);
>  		}
>  		joins[top++] = b;
>  	}
> 
> U opt_datacyclotron.mx
> Index: opt_datacyclotron.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_datacyclotron.mx,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -u -d -r1.6 -r1.7
> --- opt_datacyclotron.mx	5 May 2009 14:20:06 -0000	1.6
> +++ opt_datacyclotron.mx	16 May 2009 21:02:04 -0000	1.7
> @@ -114,14 +114,14 @@
>  	(void) tab;
>  	(void) col;
>  	(void) kind;
> -	throw(MAL,"datacyclotron.request","nyi");
> +	throw(MAL,"datacyclotron.request",PROGRAM_NYI);
>  }
>  
>  str
>  DCpin(int *ret, int *bid){
>  	(void) ret;
>  	(void) bid;
> -	throw(MAL,"datacyclotron.pin","nyi");
> +	throw(MAL,"datacyclotron.pin",PROGRAM_NYI);
>  }
>  
>  
> @@ -129,6 +129,6 @@
>  DCunpin(int *ret, int *bid){
>  	(void) ret;
>  	(void) bid;
> -	throw(MAL,"datacyclotron.unpin","nyi");
> +	throw(MAL,"datacyclotron.unpin",PROGRAM_NYI);
>  }
>  
> 
> U opt_statistics.mx
> Index: opt_statistics.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_statistics.mx,v
> retrieving revision 1.18
> retrieving revision 1.19
> diff -u -d -r1.18 -r1.19
> --- opt_statistics.mx	7 Jan 2009 14:15:13 -0000	1.18
> +++ opt_statistics.mx	16 May 2009 21:02:04 -0000	1.19
> @@ -192,10 +192,8 @@
>  	int idx;
>  	QOTstatisticsInit();
>  	idx= QOTindex(*nme);
> -	if( idx <  0)
> -		throw(MAL,"optimizer.getStatistics","Illegal property");
> -	if( qotStat[idx] ==  0)
> -		throw(MAL,"optimizer.getStatistics","Statistics table not valid");
> +	if( idx <  0 || qotStat[idx] == 0 )
> +		throw(ILLARG,"optimizer.getStatistics",RUNTIME_OBJECT_MISSING);
>  	BBPincref(*ret= qotStat[idx]->batCacheid, TRUE);
>  	return MAL_SUCCEED;
>  }
> 
> 
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables 
> unlimited royalty-free distribution of the report engine 
> for externally facing server and web deployment. 
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Monetdb-checkins mailing list
> Monetdb-checkins at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins


-- 
Sjoerd Mullender




More information about the developers-list mailing list