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


##########
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:
   `id` runs from 0 to 4 here, so `IF(id < 0, CAST(NULL AS DOUBLE), d)` never 
actually produces a null. This key shows that a nullable element type is 
admitted in strict mode, but it never sorts a real null element next to the NaN 
payloads and signed zeros. Would something like `IF(id = 4, CAST(NULL AS 
DOUBLE), d)` work? The extractor and the raw-bits assertion below would need to 
skip or expect the null for that row. Then the test would also check that the 
null element sorts first, which is what the comment at lines 297-299 describes.



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