@@ -178,6 +178,28 @@ def test_pyarrow_limit(catalog: Catalog) -> None:
178178 assert len (full_result ) == 10
179179
180180
181+ @pytest .mark .integration
182+ @pytest .mark .filterwarnings ("ignore" )
183+ @pytest .mark .parametrize ('catalog' , [pytest .lazy_fixture ('catalog_hive' ), pytest .lazy_fixture ('catalog_rest' )])
184+ def test_daft_nan (catalog : Catalog ) -> None :
185+ table_test_null_nan_rewritten = catalog .load_table ("default.test_null_nan_rewritten" )
186+ df = table_test_null_nan_rewritten .to_daft ()
187+ assert df .count_rows () == 3
188+ assert math .isnan (df .to_pydict ()["col_numeric" ][0 ])
189+
190+
191+ @pytest .mark .integration
192+ @pytest .mark .parametrize ('catalog' , [pytest .lazy_fixture ('catalog_hive' ), pytest .lazy_fixture ('catalog_rest' )])
193+ def test_daft_nan_rewritten (catalog : Catalog ) -> None :
194+ table_test_null_nan_rewritten = catalog .load_table ("default.test_null_nan_rewritten" )
195+ df = table_test_null_nan_rewritten .to_daft ()
196+ df = df .where (df ["col_numeric" ].float .is_nan ())
197+ df = df .select ("idx" , "col_numeric" )
198+ assert df .count_rows () == 1
199+ assert df .to_pydict ()["idx" ][0 ] == 1
200+ assert math .isnan (df .to_pydict ()["col_numeric" ][0 ])
201+
202+
181203@pytest .mark .integration
182204@pytest .mark .filterwarnings ("ignore" )
183205@pytest .mark .parametrize ('catalog' , [pytest .lazy_fixture ('catalog_hive' ), pytest .lazy_fixture ('catalog_rest' )])
0 commit comments