Skip to content

Commit 98d22ce

Browse files
committed
pyarrow compat
1 parent c5bf7f8 commit 98d22ce

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pandas/tests/io/test_sql.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@
3535
import pytest
3636

3737
from pandas._libs import lib
38-
from pandas.compat import pa_version_under8p0
38+
from pandas.compat import (
39+
pa_version_under8p0,
40+
pa_version_under13p0,
41+
)
3942
from pandas.compat._optional import import_optional_dependency
4043
import pandas.util._test_decorators as td
4144

@@ -1746,13 +1749,16 @@ def test_api_custom_dateparsing_error(
17461749
if conn_name == "postgresql_adbc_conn":
17471750
expected = expected.astype(
17481751
{
1749-
"DateCol": "datetime64[us]", # TODO: is this astype allowed?
17501752
"IntDateCol": "int32",
17511753
"IntDateOnlyCol": "int32",
17521754
"IntCol": "int32",
17531755
}
17541756
)
17551757

1758+
if not pa_version_under13p0:
1759+
# TODO: is this astype safe?
1760+
expected["DateCol"] = expected["DateCol"].astype("datetime64[us]")
1761+
17561762
tm.assert_frame_equal(result, expected)
17571763

17581764

0 commit comments

Comments
 (0)