You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:19:17 UTC

[jira] [Created] (TRAFODION-975) LP Bug: 1417739 - Multi-temperature data: should not allow divisioning on float datatype.

Alice Chen created TRAFODION-975:
------------------------------------

             Summary: LP Bug: 1417739 - Multi-temperature data: should not allow divisioning on float datatype.
                 Key: TRAFODION-975
                 URL: https://issues.apache.org/jira/browse/TRAFODION-975
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
            Reporter: Julie Thai
            Assignee: Hans Zeller


Should not allow divisioning on float datatype. Rounding errors could in some extreme cases lead to inconsistent data in a table (e.g. two rows with the same primary key).

>>CREATE  TABLE mtderr(store_id integer not null,
+>item_id  integer not null,
+>sale_date date default date '2000-01-01' not null ,
+>sale_amt double precision not null,
+>quantity integer not null,
+>PRIMARY KEY (store_id, sale_amt))
+>DIVISION BY ((sale_amt + 182.0)/182.0);

--- SQL operation complete.


To reproduce:
CREATE  TABLE mtderr(store_id integer not null,
item_id  integer not null,
sale_date date default date '2000-01-01' not null ,
sale_amt double precision not null,
quantity integer not null,
PRIMARY KEY (store_id, sale_amt))
DIVISION BY ((sale_amt + 182.0)/182.0);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)