thimoonxy commented on issue #1682: Failed to insert decimal data
URL: 
https://github.com/apache/incubator-doris/issues/1682#issuecomment-523323335
 
 
   > seems not a bug, DECIMAL(4,3) allows 3 digits after decimal point, 1 
before point only.
   ```
   mysql> create table t3 (k1 int, k2 date, v1 decimal(5,3) ) DUPLICATE KEY(k1, 
k2) DISTRIBUTED BY HASH(`k1`) BUCKETS 10;
   Query OK, 0 rows affected (0.02 sec)
   
   mysql> insert into t3 values(1, "2019-08-21", 12.3);
   Query OK, 0 rows affected (0.28 sec)
   
   mysql> insert into t3 values(1, "2019-08-21", 12.32);
   Query OK, 0 rows affected (0.23 sec)
   
   mysql> insert into t3 values(1, "2019-08-21", 12.321);
   Query OK, 0 rows affected (0.30 sec)
   
   mysql> insert into t3 values(1, "2019-08-21", 12.3210);
   Query OK, 0 rows affected (0.24 sec)
   
   mysql> insert into t3 values(1, "2019-08-21", 12.32101);
   Query OK, 0 rows affected (0.25 sec)
   
   mysql> insert into t3 values(1, "2019-08-21", 12.321012);
   Query OK, 0 rows affected (0.24 sec)
   
   mysql> select * from t3;
   +------+------------+--------+
   | k1   | k2         | v1     |
   +------+------------+--------+
   |    1 | 2019-08-21 |   12.3 |
   |    1 | 2019-08-21 |  12.32 |
   |    1 | 2019-08-21 | 12.321 |
   |    1 | 2019-08-21 | 12.321 |
   |    1 | 2019-08-21 | 12.321 |
   |    1 | 2019-08-21 | 12.321 |
   +------+------------+--------+
   6 rows in set (0.01 sec)
   ```

----------------------------------------------------------------
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