ConeyLiu commented on code in PR #1427: URL: https://github.com/apache/iceberg-python/pull/1427#discussion_r1886445512
########## tests/integration/test_reads.py: ########## @@ -873,3 +873,48 @@ def test_table_scan_empty_table(catalog: Catalog) -> None: result_table = tbl.scan().to_arrow() assert len(result_table) == 0 + + +@pytest.mark.integration +def test_plan_tasks(session_catalog: Catalog) -> None: + from pyiceberg.table import TableProperties + + table_name = "default.test_plan_tasks" + try: + session_catalog.drop_table(table_name) + except NoSuchTableError: + pass # Just to make sure that the table doesn't exist + + tbl = session_catalog.create_table( + table_name, + Schema( + NestedField(1, "number", LongType()), + ), + properties={TableProperties.PARQUET_ROW_GROUP_LIMIT: "1"}, + ) + + # Write 10 row groups, that should end up as 10 batches + entries = 10 + tbl.append( + pa.Table.from_pylist( + [ + { + "number": number, + } + for number in range(entries) + ], + ) + ) + Review Comment: added an assert. Here it should only have one file but 10 row groups. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org