You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "kosiew (via GitHub)" <gi...@apache.org> on 2026/10/15 10:16:16 UTC

Re: [PR] fix: preserve negative zero in trunc [datafusion]

kosiew commented on code in PR #25732:
URL: https://github.com/apache/datafusion/pull/25732#discussion_r4281745384


##########
datafusion/sqllogictest/test_files/math.slt:
##########
@@ -88,6 +88,11 @@ SELECT round(125.2345, -3), round(125.2345, -2), round(125.2345, -1), round(125.
 ----
 0 100 130 125 125 125.2 125.23 125.235
 
+query RR
+SELECT 1.0 / trunc(column1), 1.0 / trunc(column1, 0) FROM (VALUES (CAST(-0.0 AS DOUBLE)));

Review Comment:
   Could we also add the equivalent test using `CAST(-0.0 AS REAL)`? The unit tests cover Float32, but the SQL test only exercises DOUBLE. This would also check Float32 coercion and UDF dispatch for both argument forms. It's optional.



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org