You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/01/03 08:12:22 UTC

[GitHub] [incubator-doris] liutang123 opened a new issue #2651: fraction part of decimal should not be negative

liutang123 opened a new issue #2651: fraction part of decimal should not be negative
URL: https://github.com/apache/incubator-doris/issues/2651
 
 
   **Describe the bug**
   Negative fraction results in unexpected error. 
   **To Reproduce**
   
   1. Create a table with decimal column.
   ```CREATE TABLE `abc` (
     `d` decimal(10, 5) NULL COMMENT ""
   ) ENGINE=OLAP
   DUPLICATE KEY(`d`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`d`) BUCKETS 1
   PROPERTIES (
   "storage_type" = "COLUMN",
    "replication_num" = "1"
   );```
   2. Insert a value with negative fraction.
   ```insert into abc values (12.-4);```
   3. fetch the value
   ```select * from abc;```
   **Expected behavior**
   ```
   +------+
   | d    |
   +------+
   |    8 |
   +------+
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org