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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to