wForget commented on issue #2448:
URL:
https://github.com/apache/datafusion-comet/issues/2448#issuecomment-3346302963
> We might be able to simply fix this by wrapping NormalizeNaNAndZero in the
min/max agg for float types in comet.
This may not be a solution. Spark only does normalization when sorting, so
returning `-0.0` or `0.0` is unstable.
```
test("test min on -0.0 and 0.0") {
withSQLConf(
CometConf.COMET_SPARK_TO_ARROW_ENABLED.key -> "true",
CometConf.COMET_SPARK_TO_ARROW_SUPPORTED_OPERATOR_LIST.key ->
"LocalTableScan",
CometConf.COMET_EXEC_SHUFFLE_ENABLED.key -> "true"
) {
// succeed with -0.0
checkSparkAnswer("SELECT min(col1) FROM VALUES (-0.0f), (0.0f)")
// failed, spark returns 0.0, comet returns -0.0
checkSparkAnswer("SELECT min(col1) FROM VALUES (0.0f), (-0.0f)")
}
}
```
--
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]