dynamobi/dynamobi — Issue #816: [FRG-54] java calc does not always round properly when casting from one datatype to another
Author: dynamobi-build
Created: 2011-12-30 03:50:21+00:00
State: open
Labels: FRG, Java Calc Codegen

[reporter="schoi", created="Thu, 23 Feb 2006 16:23:51 -0500 (GMT-05:00)"]
Repro:

-----------

-- using JAVA calc

alter system set "calcVirtualMachine"='CALCVM_JAVA';

create table iT (i1 integer primary key, i integer);

insert into iT values(1, cast (1.99 as integer));

insert into iT values(2, cast (1.99 as double));

insert into iT values(3, cast (1.99 as float));

insert into iT values(4, cast (1.99 as real));

insert into iT values(5, cast (1.99 as decimal));

select i from iT;

+----+

| I |

+----+

| 2 |

| 1 |

| 1 |

| 1 |

| 2 |

+----+

-- Using FENNEL calc, re-run the same thing..

alter system set "calcVirtualMachine"='CALCVM_FENNEL';

...

select i from iT;

+----+

| I |

+----+

| 2 |

| 2 |

| 2 |

| 2 |

| 2 |

+----+