sunchao commented on code in PR #5393:
URL: https://github.com/apache/datafusion-comet/pull/5393#discussion_r3818521549


##########
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:
   [P2] Make the signed-zero trig checks sign-sensitive
   
   Could the zero cases here and in `tan.sql` also have plain `query` 
assertions? They still run only with `tolerance=1e-6`: 
`CometTestBase.checkAnswerWithTolerance` compares infinities only by 
`isInfinity` and finite values by absolute difference, so it accepts 
`+Infinity` for the expected `csc(-0.0) == -Infinity`, and `+0.0` for 
`tan(-0.0) == -0.0`. Replaying the exact Spark 4.1.1 fixture queries through 
that comparator with only these signs changed still passes all three 
assertions. These corrected inputs therefore remain unable to detect sign loss. 
Please retain tolerance for ordinary trig values and add exact signed-zero 
checks for the column and literal cases.



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