comphead commented on issue #2646:
URL:
https://github.com/apache/datafusion-comet/issues/2646#issuecomment-3524544102
Repro:
```
test("corr - nan/null") {
withTable("t1") {
sql("""create table t1 using parquet as
select cast(null as float) f1, CAST('NaN' AS float) f2, cast(null
as double) d1, CAST('NaN' AS double) d2
from range(1)
""")
checkSparkAnswerAndOperator(
"""
|select
| corr(f1, f2) c1,
| corr(f1, f1) c2,
| corr(f2, f1) c3,
| corr(f2, f2) c4,
| corr(d1, d2) c5,
| corr(d1, d1) c6,
| corr(d2, d1) c7,
| corr(d2, d2) c8
| FROM t1""".stripMargin)
}
}
== Results ==
!== Correct Answer - 1 ==
== Spark Answer - 1 ==
struct<c1:double,c2:double,c3:double,c4:double,c5:double,c6:double,c7:double,c8:double>
struct<c1:double,c2:double,c3:double,c4:double,c5:double,c6:double,c7:double,c8:double>
![null,null,null,null,null,null,null,null]
[null,null,null,NaN,null,null,null,NaN]
```
--
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]