Skip to content

Commit 52f5051

Browse files
committed
Add test to confirm SELECT isnan(NULL) works due to coercion with Exact
1 parent 4413310 commit 52f5051

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • datafusion/sqllogictest/test_files/spark/math

datafusion/sqllogictest/test_files/spark/math/isnan.slt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,11 @@ SELECT
8383
isnan(CAST(NULL AS INT)) AS null_int;
8484
----
8585
false false false false
86+
87+
# Untyped NULL literal: relies on DataFusion coercing Null -> Float64 to satisfy
88+
# the Exact(Float32)/Exact(Float64) signature. Without that coercion, planning
89+
# would fail and we'd diverge from Spark, which returns false here.
90+
query B
91+
SELECT isnan(NULL);
92+
----
93+
false

0 commit comments

Comments
 (0)