gengliangwang commented on a change in pull request #35682:
URL: https://github.com/apache/spark/pull/35682#discussion_r816049006
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/DataFrameNaFunctionsSuite.scala
##########
@@ -444,21 +444,25 @@ class DataFrameNaFunctionsSuite extends QueryTest with
SharedSparkSession {
}
test("replace float with nan") {
- checkAnswer(
- createNaNDF().na.replace("*", Map(
- 1.0f -> Float.NaN
- )),
- Row(0, 0L, 0.toShort, 0.toByte, Float.NaN, Double.NaN) ::
- Row(0, 0L, 0.toShort, 0.toByte, Float.NaN, Double.NaN) :: Nil)
+ if (!conf.ansiEnabled) {
Review comment:
yeah, this case casts Float.NaN as Int.
For non-ansi, the result is 0
--
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]