You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/08/21 06:54:31 UTC

[GitHub] [incubator-doris] thimoonxy commented on issue #1682: Failed to insert decimal data

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:
users@infra.apache.org


With regards,
Apache Git Services

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