seawinde opened a new pull request, #26666:
URL: https://github.com/apache/doris/pull/26666

   ## Proposed changes
   
   Use field datatype such as decimal(10, 0) to create table like. Because the 
scale is 0, the precision and scale will lost when create table like done. this 
will fix the bug.
   
   **Before fix, create table with following SQL**:
   CREATE TABLE IF NOT EXISTS db_test.table_test
   (
       `name` varchar COMMENT "1m size",
       `id` SMALLINT COMMENT "[-32768, 32767]",
       `timestamp0` decimal null comment "c0",
       `timestamp1` decimal(38, 0) null comment "c1"
   )
   DISTRIBUTED BY HASH(`id`) BUCKETS 1
   PROPERTIES ('replication_num' = '1');
   
   **and Then run**
   CREATE TABLE db_test.table_test_like LIKE db_test.table_test SHOW CREATE 
TABLE db_test.table_test_like;
   
   the field `timestamp1` will be decimal(9, 0), it's wrong. this will fix it.
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to