Skip to content

Commit 6cb3539

Browse files
author
Sreesh Maheshwar
committed
Add a count test
1 parent aeca168 commit 6cb3539

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

pyiceberg/table/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,6 @@ def scan(
10961096
limit=limit,
10971097
)
10981098

1099-
# TODO: Consider more concise name
11001099
def incremental_append_scan(
11011100
self,
11021101
row_filter: Union[str, BooleanExpression] = ALWAYS_TRUE,

tests/integration/test_reads.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,20 @@ def test_incremental_append_scan_limit(catalog: Catalog) -> None:
11181118
assert len(scan.to_arrow()) == 2
11191119

11201120

1121+
@pytest.mark.integration
1122+
@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")])
1123+
def test_incremental_append_scan_count(catalog: Catalog) -> None:
1124+
test_table = catalog.load_table("default.test_incremental_read")
1125+
1126+
scan = (
1127+
test_table.incremental_append_scan()
1128+
.from_snapshot_exclusive(test_table.snapshots()[0].snapshot_id)
1129+
.to_snapshot_inclusive(test_table.snapshots()[2].snapshot_id)
1130+
)
1131+
1132+
assert scan.count() == 3
1133+
1134+
11211135
@pytest.mark.integration
11221136
@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive")])
11231137
def test_incremental_append_scan_to_snapshot_defaults_to_current(catalog: Catalog) -> None:

0 commit comments

Comments
 (0)