sam-1112 commented on code in PR #5393:
URL: https://github.com/apache/datafusion-comet/pull/5393#discussion_r3819199522
##########
spark/src/test/resources/sql-tests/expressions/math/csc.sql:
##########
@@ -19,7 +19,7 @@ statement
CREATE TABLE test_csc(d double) USING parquet
statement
-INSERT INTO test_csc VALUES (0.0), (-0.0), (1.5707963267948966),
(-1.5707963267948966), (3.141592653589793), (NULL), (cast('NaN' as double)),
(cast('Infinity' as double)), (cast('-Infinity' as double))
+INSERT INTO test_csc VALUES (0.0), (double('-0.0')), (1.5707963267948966),
(-1.5707963267948966), (3.141592653589793), (NULL), (cast('NaN' as double)),
(cast('Infinity' as double)), (cast('-Infinity' as double))
Review Comment:
Thanks — confirmed. `checkAnswerWithTolerance` only tests `isInfinity` and
absolute difference, so the corrected `csc(-0.0)` / `tan(-0.0)` inputs still
could not detect a sign flip. I kept `tolerance=1e-6` for ordinary trig values
and added plain `query` assertions for the zero column and literal cases in
`csc.sql` and `tan.sql`.
`atan2.sql` had the same hole for the ±0 results (Spark canonicalizes both
args with `+0.0`, so a leftover `-0.0` would also pass under tolerance). Those
cases now use exact comparison too; the ±π cases stay on the tolerance queries.
I also noted this in `sql-file-tests.md` next to `query tolerance=` and the
signed-zero guidance.
--
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]