martin-g commented on code in PR #18979: URL: https://github.com/apache/datafusion/pull/18979#discussion_r2571345654
########## datafusion/sqllogictest/test_files/scalar.slt: ########## @@ -317,6 +317,16 @@ select ceil(100.1234, 1) query error DataFusion error: This feature is not implemented: CEIL with datetime is not supported select ceil(100.1234 to year) +# ceil with decimal argument +query RRRR +select + ceil(arrow_cast(1.23,'Decimal128(10,2)')), + ceil(arrow_cast(-1.23,'Decimal128(10,2)')), + ceil(arrow_cast(123.00,'Decimal128(10,2)')), + ceil(arrow_cast(-123.00,'Decimal128(10,2)')); +---- +2 -1 123 -123 Review Comment: Assuming it returns decimals: Why the numbers after the decimal point (`.00`) are not printed ? I'd expect them to be printed for decimals but maybe it has been decided in the past to not do it for `.0` ########## datafusion/sqllogictest/test_files/scalar.slt: ########## @@ -317,6 +317,16 @@ select ceil(100.1234, 1) query error DataFusion error: This feature is not implemented: CEIL with datetime is not supported select ceil(100.1234 to year) +# ceil with decimal argument +query RRRR +select + ceil(arrow_cast(1.23,'Decimal128(10,2)')), Review Comment: Would the following will be valid: ``` ceil(arrow_cast(9.23,'Decimal128(3,2)')), ``` ? It would return 10.00 which is above the requested precision of 3 -- 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]
