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

   ## Proposed changes
   https://github.com/apache/doris/pull/38945
   Added the computeSignature function for millisecond/microsecond calculation 
functions to generate parameters and return values with the appropriate 
precision.
   Modified the microSecondsAdd function, which was used for constant folding, 
because constant folding uses the precision of the parameters for calculation. 
However, for millisecond/microsecond calculations, it is necessary to set the 
precision to the maximum to ensure correct display.
   
   
   before
   ```
   mysql> SELECT MICROSECONDS_SUB('2010-11-30 23:50:50', 2);
   +-------------------------------------------------------------------+
   | microseconds_sub(cast('2010-11-30 23:50:50' as DATETIMEV2(0)), 2) |
   +-------------------------------------------------------------------+
   | 2010-11-30 23:50:49                                               |
   +-------------------------------------------------------------------+
   ```
   now
   ```
   mysql> SELECT MICROSECONDS_SUB('2010-11-30 23:50:50', 2);
   +-------------------------------------------------------------------+
   | microseconds_sub(cast('2010-11-30 23:50:50' as DATETIMEV2(0)), 2) |
   +-------------------------------------------------------------------+
   | 2010-11-30 23:50:49.999998                                        |
   +-------------------------------------------------------------------+
   ```
   
   
   <!--Describe your changes.-->
   
   ## Proposed changes
   
   Issue Number: close #xxx
   
   <!--Describe your changes.-->
   
   


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