AcKing-Sam commented on PR #32518:
URL: https://github.com/apache/doris/pull/32518#issuecomment-2022288989

   @zhiqiang-hhhh 
   
   Hi, I wonder what is the correct answer of this sql:
   `select cast(a as decimal(30, 4)) from (select cast("9999-12-31 
23:59:59.999999" as datetime(6)) a) t1;`
   
   For MYSQL, the answer is:
   ```sql
   +---------------------------+
   | cast(a as decimal(30, 4)) |
   +---------------------------+
   |       99991231235960.0000 |
   +---------------------------+
   ```
   For my implementation, it is:
   ```sql
   +-----------------------------+
   | cast(a as DECIMALV3(30, 4)) |
   +-----------------------------+
   |         99991231235959.9999 |
   +-----------------------------+
   1 row in set (0.02 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.

To unsubscribe, e-mail: commits-unsubscr...@doris.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