Skip to content

Commit c42e3f8

Browse files
Dharin-shahevertlammerts
authored andcommitted
fix NaN response
1 parent 1db145c commit c42e3f8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/fast/spark/test_spark_functions_numeric.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import math
66

77
import numpy as np
8-
from spark_namespace import USE_ACTUAL_SPARK
98
from spark_namespace.sql import functions as sf
109
from spark_namespace.sql.types import Row
1110

@@ -288,12 +287,7 @@ def test_asin(self, spark):
288287
res = df.select("asin_value").collect()
289288

290289
assert res[0].asin_value == 0
291-
if USE_ACTUAL_SPARK:
292-
assert np.isnan(res[1].asin_value)
293-
else:
294-
# TODO: DuckDB should return NaN here. Reason is that # noqa: TD002, TD003
295-
# ConstantExpression(float("nan")) gives NULL and not NaN
296-
assert res[1].asin_value is None
290+
assert np.isnan(res[1].asin_value)
297291

298292
def test_corr(self, spark):
299293
N = 20

0 commit comments

Comments
 (0)