Jibing-Li commented on code in PR #49074:
URL: https://github.com/apache/doris/pull/49074#discussion_r1995222893


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/NumericArithmetic.java:
##########
@@ -1072,7 +1072,7 @@ public static Expression dlog1(DoubleLiteral first) {
         if (inputOutOfBound(first, 0.0d, Double.MAX_VALUE, false, true)) {
             return new NullLiteral(DoubleType.INSTANCE);
         }
-        return checkOutputBoundary(new 
DoubleLiteral(Math.log1p(first.getValue())));
+        return checkOutputBoundary(new 
DoubleLiteral(Math.log(first.getValue())));

Review Comment:
   fixed



##########
regression-test/suites/nereids_p0/expression/fold_constant/fold_constant_string_arithmatic.groovy:
##########
@@ -448,7 +564,65 @@ suite("fold_constant_string_arithmatic") {
     testFoldConst("select rtrim(cast('  Hello World  ' as string))")
     testFoldConst("select rtrim('Hello')")
     testFoldConst("select rtrim('  Hello World  ')")
-    
+    testFoldConst("select rtrim('abc ')")
+    testFoldConst("select rtrim('abc,,,', ',')")
+    testFoldConst("select rtrim('Aaabc', 'A')")
+    testFoldConst("select rtrim('Aaabc', 'c')")
+    testFoldConst("select rtrim('abc;;;', ';')")
+    testFoldConst("select rtrim('abc, ', ' ,')")
+    testFoldConst("select rtrim(null)")
+    testFoldConst("select rtrim('abc', null)")
+    testFoldConst("select rtrim(null, null)")
+    testFoldConst("select rtrim('abcxyz', 'xyz')")
+    testFoldConst("select rtrim('abcxyxzy', 'xyz')")
+    testFoldConst("select rtrim('')")
+    testFoldConst("select rtrim('', 'a')")
+    testFoldConst("select rtrim(123)")
+    testFoldConst("select rtrim(0)")
+    testFoldConst("select rtrim(true)")

Review Comment:
   added



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