Skip to content

Commit 4246d17

Browse files
Fix CI, fix existing table test
1 parent a83c62f commit 4246d17

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pandas/io/iceberg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
from pandas import DataFrame
99

1010
if TYPE_CHECKING:
11-
from pyiceberg.catalog import Catalog # noqa: TC004
11+
from pyiceberg.catalog import Catalog
1212

1313

1414
def _get_catalog(
1515
catalog_name: str | None, catalog_properties: dict[str, Any] | None
16-
) -> Catalog:
16+
) -> "Catalog":
1717
pyiceberg_catalog = import_optional_dependency("pyiceberg.catalog")
1818
if catalog_properties is None:
1919
catalog_properties = {}

pandas/tests/io/test_iceberg.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,11 @@ def test_write_existing_table(self, catalog):
185185
)
186186
new = pd.DataFrame(
187187
{
188-
"A": [4, 5],
189-
"B": ["bar", "foobar"],
188+
"A": [1, 2, 3],
189+
"B": ["foo", "foo", "foo"],
190190
}
191191
)
192+
expected = pd.concat([original, new], ignore_index=True)
192193
new.to_iceberg(
193194
"ns.my_table",
194195
catalog_properties={"uri": catalog.uri},
@@ -198,4 +199,4 @@ def test_write_existing_table(self, catalog):
198199
"ns.my_table",
199200
catalog_properties={"uri": catalog.uri},
200201
)
201-
tm.assert_frame_equal(result, pd.concat([original, new]))
202+
tm.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)