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

   ## Proposed changes
   
   before
   
   ```
   mysql> select hours_add('2023-03-30 22:23:45.23452',8);
   +-------------------------------------+
   | hours_add('2023-03-30 22:23:45', 8) |
   +-------------------------------------+
   | 2023-03-31 06:23:45                 |
   +-------------------------------------+
   1 row in set (0.00 sec)
   
   mysql> select date_add('2023-03-30 22:23:45.23452',8);
   +------------------------------------+
   | date_add('2023-03-30 22:23:45', 8) |
   +------------------------------------+
   | 2023-04-07 22:23:45                |
   +------------------------------------+
   1 row in set (0.00 sec)
   ```
   <img width="928" alt="image" 
src="https://github.com/apache/doris/assets/59914473/d9088658-fadf-4894-9398-b47e2b050f92";>
   
   
   after
   
   ```
   mysql [test]>select hours_add('2023-03-30 22:23:45.23452',8);
   +-------------------------------------------+
   | hours_add('2023-03-30 22:23:45.23452', 8) |
   +-------------------------------------------+
   | 2023-03-31 06:23:45.23452                 |
   +-------------------------------------------+
   1 row in set (0.01 sec)
   
   mysql [test]>select date_add('2023-03-30 22:23:45.23452',8);
   +------------------------------------------+
   | date_add('2023-03-30 22:23:45.23452', 8) |
   +------------------------------------------+
   | 2023-04-07 22:23:45.23452                |
   +------------------------------------------+
   1 row in set (0.00 sec)
   
   mysql [test]>set enable_nereids_planner=true;
   Query OK, 0 rows affected (0.00 sec)
   
   mysql [test]>set enable_fallback_to_original_planner=false;
   Query OK, 0 rows affected (0.00 sec)
   
   mysql [test]>select hours_add('2023-03-30 22:23:45.23452',8);
   +-------------------------------------------+
   | hours_add('2023-03-30 22:23:45.23452', 8) |
   +-------------------------------------------+
   | 2023-03-31 06:23:45.23452                 |
   +-------------------------------------------+
   1 row in set (0.03 sec)
   
   mysql [test]>select date_add('2023-03-30 22:23:45.23452',8);
   +------------------------------------------+
   | days_add('2023-03-30 22:23:45.23452', 8) |
   +------------------------------------------+
   | 2023-04-07 22:23:45.23452                |
   +------------------------------------------+
   1 row in set (0.00 sec)
   ```
   
   
   
   <!--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