viirya commented on code in PR #7042: URL: https://github.com/apache/arrow-datafusion/pull/7042#discussion_r1273808418
########## datafusion/core/tests/sqllogictests/test_files/scalar.slt: ########## @@ -918,6 +918,15 @@ select trunc(4.267, 3), trunc(1.1234, 2), trunc(-1.1231, 6), trunc(1.2837284, 2) ---- 4.267 1.12 -1.1231 1.28 1 +# trunc with columns and precision +query RRR rowsort +select trunc(a, 3) as a3, trunc(a, 1) as a1, trunc(arrow_cast(a, 'Float64'), 3) as a3_f64 from small_floats; +---- +-0.7 -0.7 -0.7 +-1 -1 -1 +0.2 0.2 0.2 +0.5 0.5 0.5 Review Comment: Hmm, as `a` has at most 1 decimal point, `trunc(a, 3)` or `trunc(a, 1)` basically cannot show the difference. I think it doesn't actually test what we want? -- 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]
