andygrove commented on code in PR #333:
URL: https://github.com/apache/datafusion-spark/pull/333#discussion_r4603104021


##########
crates/sqllogictest/scripts/pyspark_slt_runner.py:
##########
@@ -925,20 +925,20 @@ def _shortest_f32(value: float) -> str:
     return repr(value)
 
 
-def _round_float(value: float, single: bool, digits: int) -> str:
-    """DataFusion's float_to_str: round, drop trailing zeros, no exponent."""
+def _plain_float(value: float, single: bool) -> str:
+    """The test engine's float text: shortest round-trip digits, no exponent.
+
+    This is Rust's `Display` for floats: a whole number has no `.0`, and `-0.0`
+    keeps its sign. NaN ignores its sign.
+    """

Review Comment:
   Done in c53a293. The suggested condition on its own fell through to the 
`math.isclose` check and reported the difference as "close", so it now returns 
`None` when the sign on zero differs. Tests cover `0` vs `-0` and `-0` vs 
`-0.0`. Filed #343 for the `pmod` sign bug, and `pmod.slt` now records Spark's 
`-0` as a commented-out query that links it.



##########
crates/sqllogictest/test_files/math/pmod.slt:
##########
@@ -429,4 +429,4 @@ SELECT pmod(10.5, 3.0) as pmod_scalar_3;
 query R
 SELECT pmod(-7.2, 3.0) as pmod_scalar_4;
 ----
-1.8
+1.7999999999999998

Review Comment:
   Added a comment linking #97 in c53a293.



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

Reply via email to