smallhibiscus opened a new issue, #9291:
URL: https://github.com/apache/incubator-doris/issues/9291

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   doris 1.0
   
   ### What's Wrong?
   
   For fields of decimal type in the data table, query and union all, if the 
decimal place in the value is .00, it will be erased.
   ```sql
   # 数据表test_a
   create table test_a 
   (id int,
   amt DECIMAL(14,2)
   )
   UNIQUE KEY (id)
   DISTRIBUTED BY HASH (id)
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2"
   );
   
   #数据表 test_b
   create table test_b 
   (id int,
   amt DECIMAL(14,2)
   )
   UNIQUE KEY (id)
   DISTRIBUTED BY HASH (id)
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2"
   ); 
   
   insert into test_a values(1,100.00);
   insert into test_a values(2,200.00);
   
   insert into test_b values(1,300.00);
   insert into test_b values(2,400.00); 
   ```
   The result is as follows:
   
   
![image](https://user-images.githubusercontent.com/29452021/165709577-d789c1fe-f40d-403c-9976-745f7dc33399.png)
   
![image](https://user-images.githubusercontent.com/29452021/165709619-8fb0071d-d169-4a12-89cb-8f0184aa37d8.png)
   
![image](https://user-images.githubusercontent.com/29452021/165709736-ea4b8de2-19aa-470b-b79b-6bab1caf2f2c.png)
   
   
   
   ### What You Expected?
   
   Display 0 after the decimal point.
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to