Re: [Monetdb-developers] [Monetdb-checkins] MonetDB5/src/modules/kernel calc.mx, Feb2010, 1.96, 1.96.2.1
On Sun, Feb 21, 2010 at 08:41:08AM +0000, Martin Kersten wrote:
Update of /cvsroot/monetdb/MonetDB5/src/modules/kernel In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5630
Modified Files: Tag: Feb2010 calc.mx Log Message: The semantics assumed overflow to produce nil-values, not an exception.
Is this in line with SQL semantic (requirements)?
AFAIK, SQL standard requires to report under-/overflows during casts as execption/errors.
Moreover, our SQL compiler/front-end cannot (easily) destinguish between NULL (NIL) values that have been in the input and NULL (NIL) values that are added to the result of a cast to indicate under-/overflows. This might have been the reason why this execption was added by Niels ...
Just my €0.02 (or less)
Stefan
Index: calc.mx
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/calc.mx,v retrieving revision 1.96 retrieving revision 1.96.2.1 diff -u -d -r1.96 -r1.96.2.1 --- calc.mx 10 Jan 2010 15:30:59 -0000 1.96 +++ calc.mx 21 Feb 2010 08:41:02 -0000 1.96.2.1 @@ -1273,8 +1273,10 @@ { if (*a == @2_nil @3) { *res= @1_nil; +/* obey semantics above, don't check for information loss if (*a != @2_nil) throw(MAL, "calc.@1", ARGUMENT_TOO_LARGE); +*/ } else { *res= @4; }
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Monetdb-checkins mailing list Monetdb-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
participants (1)
-
Stefan Manegold