morrySnow commented on code in PR #49416:
URL: https://github.com/apache/doris/pull/49416#discussion_r2011265657
##########
regression-test/suites/nereids_p0/expression/fold_constant/fold_constant_string_arithmatic.groovy:
##########
@@ -1723,5 +1723,13 @@ suite("fold_constant_string_arithmatic") {
testFoldConst("select split_by_string('a😁a😁a', '')")
testFoldConst("select character_length('a😁a😁a')")
testFoldConst("select replace_empty('a😁a😁a', '', '2')")
+
+ // bug_fix
+ testFoldConst("select concat(substr('2025-03-20',1,4)-1,'-01-01')")
+ testFoldConst("select concat(substr('2025-03-20',1,4)-1.0,'-01-01')")
+ testFoldConst("select concat(substr('2025-03-20',1,4)+1.0,'-01-01')")
+ testFoldConst("select concat(substr('2025-03-20',1,4)-0.5,'-01-01')")
+ testFoldConst("select cast(cast(2025.00 as double) as string)")
+ testFoldConst("select cast(cast(2025.00 as float) as string)")
Review Comment:
seems BE has too many different behavior with MySQL when the number is
precision overflow, maybe we do not need check this situation
--
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]