andygrove commented on code in PR #6735:
URL: https://github.com/apache/datafusion-comet/pull/6735#discussion_r4233459328


##########
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala:
##########
@@ -317,7 +311,8 @@ class CometExpressionSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
       CometConf.COMET_EXEC_STRICT_FLOATING_POINT.key -> "true") {
       for ((key, value) <- Seq[(String, Row => Double)](
           "array(d)" -> (_.getSeq[Double](1).head),
-          "named_struct('v', d)" -> (_.getStruct(1).getDouble(0)))) {
+          "named_struct('v', d)" -> (_.getStruct(1).getDouble(0)),
+          "array(IF(id < 0, CAST(NULL AS DOUBLE), d))" -> 
(_.getSeq[Double](1).head))) {

Review Comment:
   Good catch. In 2c37b8ad76 the key is `array(IF(id = 4, CAST(NULL AS DOUBLE), 
d))`, so row 4 sorts a real null element. The extractor now returns an 
`Option`, the bits check skips the null row and asserts it's row 4, and that 
key's expected order is `4, 2, 3, 0, 1`: the null element first, then the 
zeros, then the two NaNs. It passes on Spark 4.1 with the other strict nested 
sort tests.
   



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