You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Michael J. Carey (JIRA)" <ji...@apache.org> on 2019/08/02 02:38:00 UTC

[jira] [Assigned] (ASTERIXDB-2621) Somewhat inconsistent type checking - precision loss without warning

     [ https://issues.apache.org/jira/browse/ASTERIXDB-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael J. Carey reassigned ASTERIXDB-2621:
-------------------------------------------

    Assignee: Dmitry Lychagin

> Somewhat inconsistent type checking - precision loss without warning
> --------------------------------------------------------------------
>
>                 Key: ASTERIXDB-2621
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2621
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Nick DiGeronimo
>            Assignee: Dmitry Lychagin
>            Priority: Minor
>
> AsterixDB casts doubles/floats to integers with no warning. This can be risky for certain users since they might not be aware of the precision loss. Try the query below and 234.12 will become 234 with no warning. Not a big deal, but I think it's inconsistent with how AsterixDB behaves normally.
> DROP DATASET Inconvenient IF EXISTS;
> DROP TYPE InconvenientType IF EXISTS;
> CREATE TYPE InconvenientType AS OPEN {
> id: uuid,
> integerNumber: bigint
> };
> CREATE DATASET Inconvenient(InconvenientType) PRIMARY KEY id AUTOGENERATED;
> INSERT INTO Inconvenient(\{"integerNumber": 234.12});
> SELECT * FROM Inconvenient;
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)