dynamobi/dynamobi — Issue #659: [FRG-213] out of range errors which are caught when using fennel calc are not caught w/ java calc
Author: dynamobi-build
Created: 2011-12-30 03:41:36+00:00
State: open
Labels: FRG

[reporter="elin", created="Thu, 21 Sep 2006 19:25:43 -0500 (GMT-05:00)"]
-- examples:

create schema t;

set schema 't';

create table tt(

coltiny tinyint,

colsmall smallint,

colint integer,

colbig bigint,

coldec decimal(14,4),

colnum numeric(14,4),

coldouble double,

colfloat float,

colreal real);

-- these insertions should all cause out of range errors, but do not:

insert into tt(coltiny, colsmall, colint) values (128, 32768,2147483648), (-129, -32769,-2147483649);

-- these all seem to work fine, causing errors as expected

insert into tt(colbig) values (9223372036854775808), (-9223372036854775809);

insert into tt(coldec) values(100000000000);

insert into tt(coldec) values(10000000000.0);

insert into tt(colnum) values(100000000000);

insert into tt(colnum) values(10000000000.0);

insert into tt(coldouble) values(1.7977E+308);

insert into tt(coldouble) values(-1.7977E+308);

...

etc.

--------

related tests: calc.funcMathCover,conv_numeric.createsource

datatype max/min range, inclusive for fennel calc:

tinyint 127/-128

smallint 32767/-32768

integer 2147483647/-2147483648

bigint 9223372036854775807/-9223372036854775808

double 1.79769E+308/-1.79769E+308

float 1.79769E+308/-1.79769E+308

real 3.402E+38/-3.402E+38

numeric/decmials bounded by precision