Skip to content

Commit 6833344

Browse files
authored
CI: Fix pyarrow nightly ci failure (#56063)
1 parent 5b16332 commit 6833344

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pandas/compat/pyarrow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
pa_version_under13p0 = _palv < Version("13.0.0")
1515
pa_version_under14p0 = _palv < Version("14.0.0")
1616
pa_version_under14p1 = _palv < Version("14.0.1")
17+
pa_version_under15p0 = _palv < Version("15.0.0")
1718
except ImportError:
1819
pa_version_under10p1 = True
1920
pa_version_under11p0 = True
2021
pa_version_under12p0 = True
2122
pa_version_under13p0 = True
2223
pa_version_under14p0 = True
2324
pa_version_under14p1 = True
25+
pa_version_under15p0 = True

pandas/tests/io/test_parquet.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from pandas.compat.pyarrow import (
1616
pa_version_under11p0,
1717
pa_version_under13p0,
18+
pa_version_under15p0,
1819
)
1920

2021
import pandas as pd
@@ -752,7 +753,10 @@ def test_unsupported_float16(self, pa):
752753
# Not able to write float 16 column using pyarrow.
753754
data = np.arange(2, 10, dtype=np.float16)
754755
df = pd.DataFrame(data=data, columns=["fp16"])
755-
self.check_external_error_on_write(df, pa, pyarrow.ArrowException)
756+
if pa_version_under15p0:
757+
self.check_external_error_on_write(df, pa, pyarrow.ArrowException)
758+
else:
759+
check_round_trip(df, pa)
756760

757761
@pytest.mark.xfail(
758762
is_platform_windows(),
@@ -761,6 +765,7 @@ def test_unsupported_float16(self, pa):
761765
"dtypes are passed to_parquet function in windows"
762766
),
763767
)
768+
@pytest.mark.skipif(not pa_version_under15p0, reason="float16 works on 15")
764769
@pytest.mark.parametrize("path_type", [str, pathlib.Path])
765770
def test_unsupported_float16_cleanup(self, pa, path_type):
766771
# #44847, #44914

0 commit comments

Comments
 (0)