LiBinfeng-01 commented on code in PR #43422:
URL: https://github.com/apache/doris/pull/43422#discussion_r1833650961


##########
regression-test/suites/nereids_p0/expression/fold_constant/fold_constant_numeric_arithmatic.groovy:
##########
@@ -409,4 +409,13 @@ test {
 
 //Additional cases for Xor, Conv, and other mathematical functions
     testFoldConst("SELECT CONV(-10, 10, 2) AS conv_invalid_base") //Conv with 
negative input (may be undefined)
+
+    // fix floor/ceil/round function return type with DecimalV3 input
+    testFoldConst("with cte as (select floor(300.343) order by 1 limit 1) 
select * from cte")
+    testFoldConst("with cte as (select round(300.343) order by 1 limit 1) 
select * from cte")
+    testFoldConst("with cte as (select ceil(300.343) order by 1 limit 1) 
select * from cte")
+
+    testFoldConst("with cte as (select floor(300.343, 2) order by 1 limit 1) 
select * from cte")
+    testFoldConst("with cte as (select round(300.343, 2) order by 1 limit 1) 
select * from cte")
+    testFoldConst("with cte as (select ceil(300.343, 2) order by 1 limit 1) 
select * from cte")

Review Comment:
   it make sense, 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